engage/generated/root/
materialinstance.rs1#[cfg(feature = "root-materialinstance-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 behaviour::{Behaviour, IBehaviour},
12 component::{Component, IComponent},
13 monobehaviour::{IMonoBehaviour, MonoBehaviour},
14 object_2::{IObject_2, Object_2},
15 },
16 };
17
18 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/root/materialinstance/MaterialInstance.md"))]
19 #[::unity::class(namespace = "", name = "MaterialInstance")]
20 #[parent(crate::unity_engine::monobehaviour::MonoBehaviour)]
21 pub struct MaterialInstance {
22 #[offset(24)]
23 #[rename(name = "m_Material")]
24 pub m_material: crate::unity_engine::material::Material,
25 #[offset(32)]
26 #[rename(name = "m_MainTexture")]
27 pub m_main_texture: crate::unity_engine::texture2d::Texture2D,
28 #[offset(40)]
29 #[rename(name = "m_NormalMap")]
30 pub m_normal_map: crate::unity_engine::texture2d::Texture2D,
31 #[offset(48)]
32 #[rename(name = "m_Color")]
33 pub m_color: crate::unity_engine::color::Color,
34 #[offset(64)]
35 #[rename(name = "m_Clone")]
36 pub m_clone: crate::unity_engine::material::Material,
37 #[offset(72)]
38 #[rename(name = "m_Original")]
39 pub m_original: crate::unity_engine::material::Material,
40 }
41}
42
43#[cfg(feature = "root-materialinstance-types")]
44pub use __types::*;
45
46#[cfg(feature = "root-materialinstance")]
47pub trait IMaterialInstanceMethods: IMaterialInstance {
48 #[doc = "`Start()` overload"]
49 fn start(self) -> () {
50 unsafe {
51 let __receiver = <MaterialInstance as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
52 ::unity::il2cpp_call!((::unity::module_base()+0x25c6db0usize)as*mut u8,();
53(MaterialInstance)__receiver)
54 }
55 }
56 #[doc = "`Update()` overload"]
57 fn update(self) -> () {
58 unsafe {
59 let __receiver = <MaterialInstance as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
60 ::unity::il2cpp_call!((::unity::module_base()+0x25c7180usize)as*mut u8,();
61(MaterialInstance)__receiver)
62 }
63 }
64 #[doc = "`OnValidate()` overload"]
65 fn on_validate(self) -> () {
66 unsafe {
67 let __receiver = <MaterialInstance as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
68 ::unity::il2cpp_call!((::unity::module_base()+0x25c7190usize)as*mut u8,();
69(MaterialInstance)__receiver)
70 }
71 }
72 #[doc = "`CreateInstance()` overload"]
73 fn create_instance(self) -> () {
74 unsafe {
75 let __receiver = <MaterialInstance as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
76 ::unity::il2cpp_call!((::unity::module_base()+0x25c6de0usize)as*mut u8,();
77(MaterialInstance)__receiver)
78 }
79 }
80 #[doc = "`UpdateMaterial()` overload"]
81 fn update_material(self) -> () {
82 unsafe {
83 let __receiver = <MaterialInstance as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
84 ::unity::il2cpp_call!((::unity::module_base()+0x25c7070usize)as*mut u8,();
85(MaterialInstance)__receiver)
86 }
87 }
88 #[doc = "`Reload()` overload"]
89 fn reload(self) -> () {
90 unsafe {
91 let __receiver = <MaterialInstance as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
92 ::unity::il2cpp_call!((::unity::module_base()+0x25c71c0usize)as*mut u8,();
93(MaterialInstance)__receiver)
94 }
95 }
96 #[doc = "`.ctor()` overload"]
97 fn ctor(self) -> () {
98 unsafe {
99 let __receiver = <MaterialInstance as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
100 ::unity::il2cpp_call!((::unity::module_base()+0x25c7200usize)as*mut u8,();
101(MaterialInstance)__receiver)
102 }
103 }
104}
105
106#[cfg(feature = "root-materialinstance")]
107impl<__T: IMaterialInstance> IMaterialInstanceMethods for __T {}
108
109#[cfg(feature = "root-materialinstance")]
110impl MaterialInstance {
111 pub fn start_method_info() -> &'static ::unity::il2cpp::MethodInfo {
112 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
113 }
114
115 pub fn update_method_info() -> &'static ::unity::il2cpp::MethodInfo {
116 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
117 }
118
119 pub fn on_validate_method_info() -> &'static ::unity::il2cpp::MethodInfo {
120 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
121 }
122
123 pub fn create_instance_method_info() -> &'static ::unity::il2cpp::MethodInfo {
124 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
125 }
126
127 pub fn update_material_method_info() -> &'static ::unity::il2cpp::MethodInfo {
128 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
129 }
130
131 pub fn reload_method_info() -> &'static ::unity::il2cpp::MethodInfo {
132 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
133 }
134
135 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
136 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
137 }
138}
139
140#[cfg(feature = "root-materialinstance")]
141impl MaterialInstance {
142 #[doc = "`.ctor()` — no args"]
143 pub fn new() -> Self {
144 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
145 panic!(
146 "{}
147::{}
148 failed to instantiate",
149 ::core::stringify!(MaterialInstance),
150 ::core::stringify!(new),
151 )
152 });
153 <Self as IMaterialInstanceMethods>::ctor(this);
154 this
155 }
156}
157
158#[cfg(feature = "root-materialinstance")]
159#[doc(hidden)]
160pub mod prelude {
161 pub use super::{IMaterialInstance, IMaterialInstanceMethods, MaterialInstance};
162 #[cfg(feature = "system-object")]
163 pub use crate::system::object::IObjectMethods;
164 #[cfg(feature = "unity_engine-behaviour")]
165 pub use crate::unity_engine::behaviour::IBehaviourMethods;
166 #[cfg(feature = "unity_engine-component")]
167 pub use crate::unity_engine::component::IComponentMethods;
168 #[cfg(feature = "unity_engine-monobehaviour")]
169 pub use crate::unity_engine::monobehaviour::IMonoBehaviourMethods;
170 #[cfg(feature = "unity_engine-object_2")]
171 pub use crate::unity_engine::object_2::IObject_2Methods;
172 pub use crate::{
173 system::object::IObject,
174 unity_engine::{behaviour::IBehaviour, component::IComponent, monobehaviour::IMonoBehaviour, object_2::IObject_2},
175 };
176}