Skip to main content

engage/generated/app/
hubmaterialarray.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "app-hubmaterialarray-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::{
9        system::{
10            object::{IObject, Object},
11            valuetype::{IValueType, ValueType},
12        },
13        unity_engine::{
14            behaviour::{Behaviour, IBehaviour},
15            component::{Component, IComponent},
16            monobehaviour::{IMonoBehaviour, MonoBehaviour},
17            object_2::{IObject_2, Object_2},
18        },
19    };
20
21    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/hubmaterialarray/HubMaterialArray_MaterialInfo.md"))]
22    #[repr(C)]
23    #[derive(::core::clone::Clone, ::core::marker::Copy)]
24    pub struct HubMaterialArray_MaterialInfo {
25        pub name: ::unity::Il2CppString,
26        pub material: crate::unity_engine::material::Material,
27    }
28    impl ::unity::ClassIdentity for HubMaterialArray_MaterialInfo {
29        const NAME: &'static str = "HubMaterialArray.MaterialInfo";
30        const NAMESPACE: &'static str = "App";
31
32        fn class() -> ::unity::Class {
33            static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
34            *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
35        }
36    }
37    impl ::unity::IlType for HubMaterialArray_MaterialInfo {
38        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
39            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
40        }
41    }
42
43    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/hubmaterialarray/HubMaterialArray.md"))]
44    #[::unity::class(namespace = "App", name = "HubMaterialArray")]
45    #[parent(crate::unity_engine::monobehaviour::MonoBehaviour)]
46    pub struct HubMaterialArray {
47        #[offset(24)]
48        #[rename(name = "m_objectTag")]
49        pub m_object_tag: ::unity::Il2CppString,
50        #[offset(32)]
51        #[rename(name = "m_activeMaterial")]
52        pub m_active_material: ::unity::Il2CppString,
53        #[offset(40)]
54        #[rename(name = "m_materials")]
55        pub m_materials: ::unity::Array<crate::app::hubmaterialarray::HubMaterialArray_MaterialInfo>,
56        #[offset(48)]
57        #[rename(name = "m_renderer")]
58        pub m_renderer: crate::unity_engine::renderer::Renderer,
59    }
60}
61
62#[cfg(feature = "app-hubmaterialarray-types")]
63pub use __types::*;
64
65#[cfg(feature = "app-hubmaterialarray")]
66pub trait IHubMaterialArrayMethods: IHubMaterialArray {
67    #[doc = "`ChangeMaterial(::unity::Il2CppString)` overload"]
68    fn change_material(self, name: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
69        unsafe {
70            let __receiver = <HubMaterialArray as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
71            ::unity::il2cpp_call!((::unity::module_base()+0x28b5ed0usize)as*mut u8,();
72(HubMaterialArray)__receiver,(::unity::Il2CppString)::core::convert::Into::into(name))
73        }
74    }
75    #[doc = "`Awake()` overload"]
76    fn awake(self) -> () {
77        unsafe {
78            let __receiver = <HubMaterialArray as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
79            ::unity::il2cpp_call!((::unity::module_base()+0x28b6110usize)as*mut u8,();
80(HubMaterialArray)__receiver)
81        }
82    }
83    #[doc = "`ReplaceMaterial(crate::unity_engine::material::Material)` overload"]
84    fn replace_material(self, material: impl ::core::convert::Into<crate::unity_engine::material::Material>) -> () {
85        unsafe {
86            let __receiver = <HubMaterialArray as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
87            ::unity::il2cpp_call!((::unity::module_base()+0x28b5fa0usize)as*mut u8,();
88(HubMaterialArray)__receiver,(crate::unity_engine::material::Material)::core::convert::Into::into(material))
89        }
90    }
91    #[doc = "`OnDestroy()` overload"]
92    fn on_destroy(self) -> () {
93        unsafe {
94            let __receiver = <HubMaterialArray as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
95            ::unity::il2cpp_call!((::unity::module_base()+0x28b6180usize)as*mut u8,();
96(HubMaterialArray)__receiver)
97        }
98    }
99    #[doc = "`.ctor()` overload"]
100    fn ctor(self) -> () {
101        unsafe {
102            let __receiver = <HubMaterialArray as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
103            ::unity::il2cpp_call!((::unity::module_base()+0x28b6280usize)as*mut u8,();
104(HubMaterialArray)__receiver)
105        }
106    }
107}
108
109#[cfg(feature = "app-hubmaterialarray")]
110impl<__T: IHubMaterialArray> IHubMaterialArrayMethods for __T {}
111
112#[cfg(feature = "app-hubmaterialarray")]
113impl HubMaterialArray {
114    pub fn change_material_method_info() -> &'static ::unity::il2cpp::MethodInfo {
115        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
116    }
117
118    pub fn awake_method_info() -> &'static ::unity::il2cpp::MethodInfo {
119        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
120    }
121
122    pub fn replace_material_method_info() -> &'static ::unity::il2cpp::MethodInfo {
123        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
124    }
125
126    pub fn on_destroy_method_info() -> &'static ::unity::il2cpp::MethodInfo {
127        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
128    }
129
130    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
131        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
132    }
133}
134
135#[cfg(feature = "app-hubmaterialarray")]
136impl HubMaterialArray {
137    #[doc = "`.ctor()` — no args"]
138    pub fn new() -> Self {
139        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
140            panic!(
141                "{}
142::{}
143 failed to instantiate",
144                ::core::stringify!(HubMaterialArray),
145                ::core::stringify!(new),
146            )
147        });
148        <Self as IHubMaterialArrayMethods>::ctor(this);
149        this
150    }
151}
152
153#[cfg(feature = "app-hubmaterialarray")]
154#[doc(hidden)]
155pub mod prelude {
156    pub use super::{HubMaterialArray, HubMaterialArray_MaterialInfo, IHubMaterialArray, IHubMaterialArrayMethods};
157    #[cfg(feature = "system-object")]
158    pub use crate::system::object::IObjectMethods;
159    #[cfg(feature = "system-valuetype")]
160    pub use crate::system::valuetype::IValueTypeMethods;
161    #[cfg(feature = "unity_engine-behaviour")]
162    pub use crate::unity_engine::behaviour::IBehaviourMethods;
163    #[cfg(feature = "unity_engine-component")]
164    pub use crate::unity_engine::component::IComponentMethods;
165    #[cfg(feature = "unity_engine-monobehaviour")]
166    pub use crate::unity_engine::monobehaviour::IMonoBehaviourMethods;
167    #[cfg(feature = "unity_engine-object_2")]
168    pub use crate::unity_engine::object_2::IObject_2Methods;
169    pub use crate::{
170        system::{object::IObject, valuetype::IValueType},
171        unity_engine::{behaviour::IBehaviour, component::IComponent, monobehaviour::IMonoBehaviour, object_2::IObject_2},
172    };
173}