Skip to main content

engage/generated/unity_engine/rendering/universal/
coloradjustments.rs

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