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