Skip to main content

engage/generated/unity_engine/
rangeattribute.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-rangeattribute-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::{
9        system::object::{IObject, Object},
10        unity_engine::propertyattribute::{IPropertyAttribute, PropertyAttribute},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/rangeattribute/RangeAttribute.md"))]
14    #[::unity::class(namespace = "UnityEngine", name = "RangeAttribute")]
15    #[parent(crate::unity_engine::propertyattribute::PropertyAttribute)]
16    pub struct RangeAttribute {
17        #[offset(16)]
18        #[rename(name = "min")]
19        pub min: f32,
20        #[offset(20)]
21        #[rename(name = "max")]
22        pub max: f32,
23    }
24}
25
26#[cfg(feature = "unity_engine-rangeattribute-types")]
27pub use __types::*;
28
29#[cfg(feature = "unity_engine-rangeattribute")]
30pub trait IRangeAttributeMethods: IRangeAttribute {
31    #[doc = "`.ctor(f32, f32)` overload"]
32    fn ctor(self, min: impl ::core::convert::Into<f32>, max: impl ::core::convert::Into<f32>) -> () {
33        unsafe {
34            let __receiver = <RangeAttribute as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
35            ::unity::il2cpp_call!((::unity::module_base()+0x2f79e30usize)as*mut u8,();
36(RangeAttribute)__receiver,(f32)::core::convert::Into::into(min),(f32)::core::convert::Into::into(max))
37        }
38    }
39}
40
41#[cfg(feature = "unity_engine-rangeattribute")]
42impl<__T: IRangeAttribute> IRangeAttributeMethods for __T {}
43
44#[cfg(feature = "unity_engine-rangeattribute")]
45impl RangeAttribute {
46    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
47        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
48    }
49}
50
51#[cfg(feature = "unity_engine-rangeattribute")]
52impl RangeAttribute {
53    #[doc = "`.ctor(f32, f32)` — overload selector"]
54    pub fn new(min: f32, max: f32) -> Self {
55        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
56            panic!(
57                "{}
58::{}
59 failed to instantiate",
60                ::core::stringify!(RangeAttribute),
61                ::core::stringify!(new),
62            )
63        });
64        <Self as IRangeAttributeMethods>::ctor(this, min, max);
65        this
66    }
67}
68
69#[cfg(feature = "unity_engine-rangeattribute")]
70#[doc(hidden)]
71pub mod prelude {
72    pub use super::{IRangeAttribute, IRangeAttributeMethods, RangeAttribute};
73    #[cfg(feature = "system-object")]
74    pub use crate::system::object::IObjectMethods;
75    #[cfg(feature = "unity_engine-propertyattribute")]
76    pub use crate::unity_engine::propertyattribute::IPropertyAttributeMethods;
77    pub use crate::{system::object::IObject, unity_engine::propertyattribute::IPropertyAttribute};
78}