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