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