Skip to main content

engage/generated/unity_engine/rendering/
clampedintparameter.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-rendering-clampedintparameter-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::rendering::{
11            intparameter::{IIntParameter, IntParameter},
12            volumeparameter::{IVolumeParameter, VolumeParameter},
13            volumeparameter_1::{IVolumeParameter_1, VolumeParameter_1},
14        },
15    };
16
17    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/rendering/clampedintparameter/ClampedIntParameter.md"))]
18    #[::unity::class(namespace = "UnityEngine.Rendering", name = "ClampedIntParameter")]
19    #[parent(crate::unity_engine::rendering::intparameter::IntParameter)]
20    pub struct ClampedIntParameter {
21        #[offset(24)]
22        #[rename(name = "min")]
23        pub min: i32,
24        #[offset(28)]
25        #[rename(name = "max")]
26        pub max: i32,
27    }
28}
29
30#[cfg(feature = "unity_engine-rendering-clampedintparameter-types")]
31pub use __types::*;
32
33#[cfg(feature = "unity_engine-rendering-clampedintparameter")]
34pub trait IClampedIntParameterMethods: IClampedIntParameter {
35    #[doc = "`get_value()` overload"]
36    fn get_value(self) -> i32 {
37        unsafe {
38            let __receiver = <ClampedIntParameter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
39            {
40                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
41                let __vi = *__vt.get(12usize).unwrap_or_else(|| {
42                    panic!(
43                        "unity: virtual slot {}
44 out of range (vtable len {}
45) on the runtime class behind {}
46 (method `{}
47`)",
48                        12usize,
49                        __vt.len(),
50                        <ClampedIntParameter as ::unity::ClassIdentity>::NAME,
51                        "get_value",
52                    )
53                });
54                let __inner: extern "C" fn(ClampedIntParameter, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
55                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
56                __inner(__receiver, __mi)
57            }
58        }
59    }
60    #[doc = "`set_value(i32)` overload"]
61    fn set_value(self, value: impl ::core::convert::Into<i32>) -> () {
62        unsafe {
63            let __receiver = <ClampedIntParameter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
64            {
65                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
66                let __vi = *__vt.get(13usize).unwrap_or_else(|| {
67                    panic!(
68                        "unity: virtual slot {}
69 out of range (vtable len {}
70) on the runtime class behind {}
71 (method `{}
72`)",
73                        13usize,
74                        __vt.len(),
75                        <ClampedIntParameter as ::unity::ClassIdentity>::NAME,
76                        "set_value",
77                    )
78                });
79                let __inner: extern "C" fn(ClampedIntParameter, i32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
80                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
81                __inner(__receiver, ::core::convert::Into::into(value), __mi)
82            }
83        }
84    }
85    #[doc = "`.ctor(i32, i32, i32, bool)` overload"]
86    fn ctor(
87        self,
88        value: impl ::core::convert::Into<i32>,
89        min: impl ::core::convert::Into<i32>,
90        max: impl ::core::convert::Into<i32>,
91        override_state: impl ::core::convert::Into<bool>,
92    ) -> () {
93        unsafe {
94            let __receiver = <ClampedIntParameter as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
95            ::unity::il2cpp_call!((::unity::module_base()+0x352f650usize)as*mut u8,();
96(ClampedIntParameter)__receiver,(i32)::core::convert::Into::into(value),(i32)::core::convert::Into::into(min),(i32)::core::convert::Into::into(max),(bool)::core::convert::Into::into(override_state))
97        }
98    }
99}
100
101#[cfg(feature = "unity_engine-rendering-clampedintparameter")]
102impl<__T: IClampedIntParameter> IClampedIntParameterMethods for __T {}
103
104#[cfg(feature = "unity_engine-rendering-clampedintparameter")]
105impl ClampedIntParameter {
106    pub fn get_value_method_info() -> &'static ::unity::il2cpp::MethodInfo {
107        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
108    }
109
110    pub fn set_value_method_info() -> &'static ::unity::il2cpp::MethodInfo {
111        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
112    }
113
114    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
115        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
116    }
117}
118
119#[cfg(feature = "unity_engine-rendering-clampedintparameter")]
120impl ClampedIntParameter {
121    #[doc = "Direct (non-virtual) call to `ClampedIntParameter`'s own `get_value`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
122    pub unsafe fn get_value(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
123        let __mi = Self::get_value_method_info();
124        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
125        __inner(this.into(), ::core::option::Option::None)
126    }
127
128    #[doc = "Direct (non-virtual) call to `ClampedIntParameter`'s own `set_value`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
129    pub unsafe fn set_value(this: impl ::core::convert::Into<::unity::IlInstance>, value: i32) -> () {
130        let __mi = Self::set_value_method_info();
131        let __inner: extern "C" fn(::unity::IlInstance, i32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
132        __inner(this.into(), value, ::core::option::Option::None)
133    }
134}
135
136#[cfg(feature = "unity_engine-rendering-clampedintparameter")]
137impl ClampedIntParameter {
138    #[doc = "`.ctor(i32, i32, i32, bool)` — overload selector"]
139    pub fn new(value: i32, min: i32, max: i32, override_state: bool) -> Self {
140        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
141            panic!(
142                "{}
143::{}
144 failed to instantiate",
145                ::core::stringify!(ClampedIntParameter),
146                ::core::stringify!(new),
147            )
148        });
149        <Self as IClampedIntParameterMethods>::ctor(this, value, min, max, override_state);
150        this
151    }
152}
153
154#[cfg(feature = "unity_engine-rendering-clampedintparameter")]
155#[doc(hidden)]
156pub mod prelude {
157    pub use super::{ClampedIntParameter, IClampedIntParameter, IClampedIntParameterMethods};
158    #[cfg(feature = "system-object")]
159    pub use crate::system::object::IObjectMethods;
160    #[cfg(feature = "unity_engine-rendering-intparameter")]
161    pub use crate::unity_engine::rendering::intparameter::IIntParameterMethods;
162    #[cfg(feature = "unity_engine-rendering-volumeparameter")]
163    pub use crate::unity_engine::rendering::volumeparameter::IVolumeParameterMethods;
164    #[cfg(feature = "unity_engine-rendering-volumeparameter_1")]
165    pub use crate::unity_engine::rendering::volumeparameter_1::IVolumeParameter_1Methods;
166    pub use crate::{
167        system::object::IObject,
168        unity_engine::rendering::{
169            intparameter::{IIntParameter, IntParameter},
170            volumeparameter::IVolumeParameter,
171            volumeparameter_1::IVolumeParameter_1,
172        },
173    };
174}