Skip to main content

engage/generated/unity_engine/
materialpropertyblock.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-materialpropertyblock-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::object::{IObject, Object};
9
10    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/materialpropertyblock/MaterialPropertyBlock.md"))]
11    #[::unity::class(namespace = "UnityEngine", name = "MaterialPropertyBlock")]
12    #[parent(crate::system::object::Object)]
13    pub struct MaterialPropertyBlock {
14        #[offset(16)]
15        #[rename(name = "m_Ptr")]
16        pub m_ptr: ::unity::IntPtr,
17    }
18}
19
20#[cfg(feature = "unity_engine-materialpropertyblock-types")]
21pub use __types::*;
22
23#[cfg(feature = "unity_engine-materialpropertyblock")]
24impl MaterialPropertyBlock {
25    #[doc = "`CreateImpl()` overload"]
26    pub fn create_impl() -> ::unity::IntPtr {
27        unsafe {
28            ::unity::il2cpp_call!((::unity::module_base()+0x32de790usize)as*mut u8, ::unity::IntPtr;
29            )
30        }
31    }
32
33    #[doc = "`DestroyImpl(::unity::IntPtr)` overload"]
34    pub fn destroy_impl(mpb: impl ::core::convert::Into<::unity::IntPtr>) -> () {
35        unsafe {
36            ::unity::il2cpp_call!((::unity::module_base()+0x32de7d0usize)as*mut u8,();
37(::unity::IntPtr)::core::convert::Into::into(mpb))
38        }
39    }
40}
41
42#[cfg(feature = "unity_engine-materialpropertyblock")]
43pub trait IMaterialPropertyBlockMethods: IMaterialPropertyBlock {
44    #[doc = "`SetFloatImpl(i32, f32)` overload"]
45    fn set_float_impl(self, name: impl ::core::convert::Into<i32>, value: impl ::core::convert::Into<f32>) -> () {
46        unsafe {
47            let __receiver = <MaterialPropertyBlock as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
48            ::unity::il2cpp_call!((::unity::module_base()+0x32de530usize)as*mut u8,();
49(MaterialPropertyBlock)__receiver,(i32)::core::convert::Into::into(name),(f32)::core::convert::Into::into(value))
50        }
51    }
52    #[doc = "`SetVectorImpl(i32, crate::unity_engine::vector4::Vector4)` overload"]
53    fn set_vector_impl(self, name: impl ::core::convert::Into<i32>, value: impl ::core::convert::Into<crate::unity_engine::vector4::Vector4>) -> () {
54        unsafe {
55            let __receiver = <MaterialPropertyBlock as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
56            ::unity::il2cpp_call!((::unity::module_base()+0x32de590usize)as*mut u8,();
57(MaterialPropertyBlock)__receiver,(i32)::core::convert::Into::into(name),(crate::unity_engine::vector4::Vector4)::core::convert::Into::into(value))
58        }
59    }
60    #[doc = "`SetColorImpl(i32, crate::unity_engine::color::Color)` overload"]
61    fn set_color_impl(self, name: impl ::core::convert::Into<i32>, value: impl ::core::convert::Into<crate::unity_engine::color::Color>) -> () {
62        unsafe {
63            let __receiver = <MaterialPropertyBlock as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
64            ::unity::il2cpp_call!((::unity::module_base()+0x32de660usize)as*mut u8,();
65(MaterialPropertyBlock)__receiver,(i32)::core::convert::Into::into(name),(crate::unity_engine::color::Color)::core::convert::Into::into(value))
66        }
67    }
68    #[doc = "`SetTextureImpl(i32, crate::unity_engine::texture::Texture)` overload"]
69    fn set_texture_impl(self, name: impl ::core::convert::Into<i32>, value: impl ::core::convert::Into<crate::unity_engine::texture::Texture>) -> () {
70        unsafe {
71            let __receiver = <MaterialPropertyBlock as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
72            ::unity::il2cpp_call!((::unity::module_base()+0x32de730usize)as*mut u8,();
73(MaterialPropertyBlock)__receiver,(i32)::core::convert::Into::into(name),(crate::unity_engine::texture::Texture)::core::convert::Into::into(value))
74        }
75    }
76    #[doc = "`Clear(bool)` overload"]
77    fn clear(self, keep_memory: impl ::core::convert::Into<bool>) -> () {
78        unsafe {
79            let __receiver = <MaterialPropertyBlock as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
80            ::unity::il2cpp_call!((::unity::module_base()+0x32de820usize)as*mut u8,();
81(MaterialPropertyBlock)__receiver,(bool)::core::convert::Into::into(keep_memory))
82        }
83    }
84    #[doc = "`Clear()` overload"]
85    fn clear_2(self) -> () {
86        unsafe {
87            let __receiver = <MaterialPropertyBlock as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
88            ::unity::il2cpp_call!((::unity::module_base()+0x32de870usize)as*mut u8,();
89(MaterialPropertyBlock)__receiver)
90        }
91    }
92    #[doc = "`.ctor()` overload"]
93    fn ctor(self) -> () {
94        unsafe {
95            let __receiver = <MaterialPropertyBlock as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
96            ::unity::il2cpp_call!((::unity::module_base()+0x32de8c0usize)as*mut u8,();
97(MaterialPropertyBlock)__receiver)
98        }
99    }
100    #[doc = "`Finalize()` overload"]
101    fn finalize(self) -> () {
102        unsafe {
103            let __receiver = <MaterialPropertyBlock as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
104            {
105                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
106                let __vi = *__vt.get(1usize).unwrap_or_else(|| {
107                    panic!(
108                        "unity: virtual slot {}
109 out of range (vtable len {}
110) on the runtime class behind {}
111 (method `{}
112`)",
113                        1usize,
114                        __vt.len(),
115                        <MaterialPropertyBlock as ::unity::ClassIdentity>::NAME,
116                        "Finalize",
117                    )
118                });
119                let __inner: extern "C" fn(MaterialPropertyBlock, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
120                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
121                __inner(__receiver, __mi)
122            }
123        }
124    }
125    #[doc = "`Dispose()` overload"]
126    fn dispose(self) -> () {
127        unsafe {
128            let __receiver = <MaterialPropertyBlock as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
129            ::unity::il2cpp_call!((::unity::module_base()+0x32de980usize)as*mut u8,();
130(MaterialPropertyBlock)__receiver)
131        }
132    }
133    #[doc = "`SetFloat(::unity::Il2CppString, f32)` overload"]
134    fn set_float(self, name: impl ::core::convert::Into<::unity::Il2CppString>, value: impl ::core::convert::Into<f32>) -> () {
135        unsafe {
136            let __receiver = <MaterialPropertyBlock as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
137            ::unity::il2cpp_call!((::unity::module_base()+0x32dea40usize)as*mut u8,();
138(MaterialPropertyBlock)__receiver,(::unity::Il2CppString)::core::convert::Into::into(name),(f32)::core::convert::Into::into(value))
139        }
140    }
141    #[doc = "`SetInt(i32, i32)` overload"]
142    fn set_int(self, name_id: impl ::core::convert::Into<i32>, value: impl ::core::convert::Into<i32>) -> () {
143        unsafe {
144            let __receiver = <MaterialPropertyBlock as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
145            ::unity::il2cpp_call!((::unity::module_base()+0x32deab0usize)as*mut u8,();
146(MaterialPropertyBlock)__receiver,(i32)::core::convert::Into::into(name_id),(i32)::core::convert::Into::into(value))
147        }
148    }
149    #[doc = "`SetVector(::unity::Il2CppString, crate::unity_engine::vector4::Vector4)` overload"]
150    fn set_vector(
151        self,
152        name: impl ::core::convert::Into<::unity::Il2CppString>,
153        value: impl ::core::convert::Into<crate::unity_engine::vector4::Vector4>,
154    ) -> () {
155        unsafe {
156            let __receiver = <MaterialPropertyBlock as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
157            ::unity::il2cpp_call!((::unity::module_base()+0x32deb10usize)as*mut u8,();
158(MaterialPropertyBlock)__receiver,(::unity::Il2CppString)::core::convert::Into::into(name),(crate::unity_engine::vector4::Vector4)::core::convert::Into::into(value))
159        }
160    }
161    #[doc = "`SetVector(i32, crate::unity_engine::vector4::Vector4)` overload"]
162    fn set_vector_2(self, name_id: impl ::core::convert::Into<i32>, value: impl ::core::convert::Into<crate::unity_engine::vector4::Vector4>) -> () {
163        unsafe {
164            let __receiver = <MaterialPropertyBlock as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
165            ::unity::il2cpp_call!((::unity::module_base()+0x32debb0usize)as*mut u8,();
166(MaterialPropertyBlock)__receiver,(i32)::core::convert::Into::into(name_id),(crate::unity_engine::vector4::Vector4)::core::convert::Into::into(value))
167        }
168    }
169    #[doc = "`SetColor(::unity::Il2CppString, crate::unity_engine::color::Color)` overload"]
170    fn set_color(
171        self,
172        name: impl ::core::convert::Into<::unity::Il2CppString>,
173        value: impl ::core::convert::Into<crate::unity_engine::color::Color>,
174    ) -> () {
175        unsafe {
176            let __receiver = <MaterialPropertyBlock as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
177            ::unity::il2cpp_call!((::unity::module_base()+0x32dec20usize)as*mut u8,();
178(MaterialPropertyBlock)__receiver,(::unity::Il2CppString)::core::convert::Into::into(name),(crate::unity_engine::color::Color)::core::convert::Into::into(value))
179        }
180    }
181    #[doc = "`SetTexture(i32, crate::unity_engine::texture::Texture)` overload"]
182    fn set_texture(self, name_id: impl ::core::convert::Into<i32>, value: impl ::core::convert::Into<crate::unity_engine::texture::Texture>) -> () {
183        unsafe {
184            let __receiver = <MaterialPropertyBlock as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
185            ::unity::il2cpp_call!((::unity::module_base()+0x32decc0usize)as*mut u8,();
186(MaterialPropertyBlock)__receiver,(i32)::core::convert::Into::into(name_id),(crate::unity_engine::texture::Texture)::core::convert::Into::into(value))
187        }
188    }
189    #[doc = "`SetVectorImpl_Injected(i32, *mutcrate::unity_engine::vector4::Vector4)` overload"]
190    fn set_vector_impl_injected(self, name: impl ::core::convert::Into<i32>) -> crate::unity_engine::vector4::Vector4 {
191        unsafe {
192            let __receiver = <MaterialPropertyBlock as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
193            let mut __out_0 = ::core::mem::MaybeUninit::<crate::unity_engine::vector4::Vector4>::uninit();
194            ::unity::il2cpp_call!((::unity::module_base()+0x32de600usize)as*mut u8,();
195(MaterialPropertyBlock)__receiver,(i32)::core::convert::Into::into(name),(*mut crate::unity_engine::vector4::Vector4)__out_0.as_mut_ptr());
196            __out_0.assume_init()
197        }
198    }
199    #[doc = "`SetColorImpl_Injected(i32, *mutcrate::unity_engine::color::Color)` overload"]
200    fn set_color_impl_injected(self, name: impl ::core::convert::Into<i32>) -> crate::unity_engine::color::Color {
201        unsafe {
202            let __receiver = <MaterialPropertyBlock as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
203            let mut __out_0 = ::core::mem::MaybeUninit::<crate::unity_engine::color::Color>::uninit();
204            ::unity::il2cpp_call!((::unity::module_base()+0x32de6d0usize)as*mut u8,();
205(MaterialPropertyBlock)__receiver,(i32)::core::convert::Into::into(name),(*mut crate::unity_engine::color::Color)__out_0.as_mut_ptr());
206            __out_0.assume_init()
207        }
208    }
209}
210
211#[cfg(feature = "unity_engine-materialpropertyblock")]
212impl<__T: IMaterialPropertyBlock> IMaterialPropertyBlockMethods for __T {}
213
214#[cfg(feature = "unity_engine-materialpropertyblock")]
215impl MaterialPropertyBlock {
216    pub fn set_float_impl_method_info() -> &'static ::unity::il2cpp::MethodInfo {
217        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
218    }
219
220    pub fn set_vector_impl_method_info() -> &'static ::unity::il2cpp::MethodInfo {
221        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
222    }
223
224    pub fn set_color_impl_method_info() -> &'static ::unity::il2cpp::MethodInfo {
225        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
226    }
227
228    pub fn set_texture_impl_method_info() -> &'static ::unity::il2cpp::MethodInfo {
229        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
230    }
231
232    pub fn create_impl_method_info() -> &'static ::unity::il2cpp::MethodInfo {
233        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
234    }
235
236    pub fn destroy_impl_method_info() -> &'static ::unity::il2cpp::MethodInfo {
237        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
238    }
239
240    pub fn clear_method_info() -> &'static ::unity::il2cpp::MethodInfo {
241        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
242    }
243
244    pub fn clear_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
245        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
246    }
247
248    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
249        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
250    }
251
252    pub fn finalize_method_info() -> &'static ::unity::il2cpp::MethodInfo {
253        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
254    }
255
256    pub fn dispose_method_info() -> &'static ::unity::il2cpp::MethodInfo {
257        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
258    }
259
260    pub fn set_float_method_info() -> &'static ::unity::il2cpp::MethodInfo {
261        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
262    }
263
264    pub fn set_int_method_info() -> &'static ::unity::il2cpp::MethodInfo {
265        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
266    }
267
268    pub fn set_vector_method_info() -> &'static ::unity::il2cpp::MethodInfo {
269        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
270    }
271
272    pub fn set_vector_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
273        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
274    }
275
276    pub fn set_color_method_info() -> &'static ::unity::il2cpp::MethodInfo {
277        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
278    }
279
280    pub fn set_texture_method_info() -> &'static ::unity::il2cpp::MethodInfo {
281        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
282    }
283
284    pub fn set_vector_impl_injected_method_info() -> &'static ::unity::il2cpp::MethodInfo {
285        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[17]
286    }
287
288    pub fn set_color_impl_injected_method_info() -> &'static ::unity::il2cpp::MethodInfo {
289        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[18]
290    }
291}
292
293#[cfg(feature = "unity_engine-materialpropertyblock")]
294impl MaterialPropertyBlock {
295    #[doc = "Direct (non-virtual) call to `MaterialPropertyBlock`'s own `Finalize`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
296    pub unsafe fn finalize(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
297        let __mi = Self::finalize_method_info();
298        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
299        __inner(this.into(), ::core::option::Option::None)
300    }
301}
302
303#[cfg(feature = "unity_engine-materialpropertyblock")]
304impl MaterialPropertyBlock {
305    #[doc = "`.ctor()` — no args"]
306    pub fn new() -> Self {
307        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
308            panic!(
309                "{}
310::{}
311 failed to instantiate",
312                ::core::stringify!(MaterialPropertyBlock),
313                ::core::stringify!(new),
314            )
315        });
316        <Self as IMaterialPropertyBlockMethods>::ctor(this);
317        this
318    }
319}
320
321#[cfg(feature = "unity_engine-materialpropertyblock")]
322#[doc(hidden)]
323pub mod prelude {
324    pub use super::{IMaterialPropertyBlock, IMaterialPropertyBlockMethods, MaterialPropertyBlock};
325    pub use crate::system::object::IObject;
326    #[cfg(feature = "system-object")]
327    pub use crate::system::object::IObjectMethods;
328}