engage/generated/app/cooking_menu/
unitselectmenuitemcontent_2.rs1#[cfg(feature = "app-cooking_menu-unitselectmenuitemcontent_2-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 app::basicmenuitemcontent::{BasicMenuItemContent, IBasicMenuItemContent},
10 system::object::{IObject, Object},
11 unity_engine::{
12 behaviour::{Behaviour, IBehaviour},
13 component::{Component, IComponent},
14 monobehaviour::{IMonoBehaviour, MonoBehaviour},
15 object_2::{IObject_2, Object_2},
16 },
17 };
18
19 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/cooking_menu/unitselectmenuitemcontent_2/UnitSelectMenuItemContent_2.md"))]
20 #[::unity::class(namespace = "App.CookingMenu", name = "UnitSelectMenuItemContent")]
21 #[parent(crate::app::basicmenuitemcontent::BasicMenuItemContent)]
22 pub struct UnitSelectMenuItemContent_2 {
23 #[offset(72)]
24 #[rename(name = "m_Setter")]
25 pub m_setter: crate::app::unitmenuitemsetter::UnitMenuItemSetter,
26 #[offset(80)]
27 #[rename(name = "m_MenuItem")]
28 pub m_menu_item: crate::app::cooking_menu::unitselectmenu_2::UnitSelectMenu_UnitSelectMenuItem,
29 #[offset(88)]
30 #[rename(name = "m_Unit")]
31 pub m_unit: crate::app::unit::Unit,
32 }
33}
34
35#[cfg(feature = "app-cooking_menu-unitselectmenuitemcontent_2-types")]
36pub use __types::*;
37
38#[cfg(feature = "app-cooking_menu-unitselectmenuitemcontent_2")]
39pub trait IUnitSelectMenuItemContent_2Methods: IUnitSelectMenuItemContent_2 {
40 #[doc = "`GetTextMeshProComponent()` overload"]
41 fn get_text_mesh_pro_component(self) -> crate::tm_pro::textmeshprougui::TextMeshProUGUI {
42 unsafe {
43 let __receiver =
44 <UnitSelectMenuItemContent_2 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(5usize).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 5usize,
55 __vt.len(),
56 <UnitSelectMenuItemContent_2 as ::unity::ClassIdentity>::NAME,
57 "GetTextMeshProComponent",
58 )
59 });
60 let __inner: extern "C" fn(UnitSelectMenuItemContent_2, ::unity::OptionalMethod) -> crate::tm_pro::textmeshprougui::TextMeshProUGUI =
61 ::core::mem::transmute(__vi.method_ptr);
62 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
63 __inner(__receiver, __mi)
64 }
65 }
66 }
67 #[doc = "`Build(crate::app::basicmenuitem::BasicMenuItem)` overload"]
68 fn build(self, menu_item: impl ::core::convert::Into<crate::app::basicmenuitem::BasicMenuItem>) -> () {
69 unsafe {
70 let __receiver =
71 <UnitSelectMenuItemContent_2 as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
72 {
73 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
74 let __vi = *__vt.get(8usize).unwrap_or_else(|| {
75 panic!(
76 "unity: virtual slot {}
77 out of range (vtable len {}
78) on the runtime class behind {}
79 (method `{}
80`)",
81 8usize,
82 __vt.len(),
83 <UnitSelectMenuItemContent_2 as ::unity::ClassIdentity>::NAME,
84 "Build",
85 )
86 });
87 let __inner: extern "C" fn(UnitSelectMenuItemContent_2, crate::app::basicmenuitem::BasicMenuItem, ::unity::OptionalMethod) -> () =
88 ::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, ::core::convert::Into::into(menu_item), __mi)
91 }
92 }
93 }
94 #[doc = "`Update()` overload"]
95 fn update(self) -> () {
96 unsafe {
97 let __receiver =
98 <UnitSelectMenuItemContent_2 as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
99 {
100 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
101 let __vi = *__vt.get(15usize).unwrap_or_else(|| {
102 panic!(
103 "unity: virtual slot {}
104 out of range (vtable len {}
105) on the runtime class behind {}
106 (method `{}
107`)",
108 15usize,
109 __vt.len(),
110 <UnitSelectMenuItemContent_2 as ::unity::ClassIdentity>::NAME,
111 "Update",
112 )
113 });
114 let __inner: extern "C" fn(UnitSelectMenuItemContent_2, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
115 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
116 __inner(__receiver, __mi)
117 }
118 }
119 }
120 #[doc = "`UpdateTextColor()` overload"]
121 fn update_text_color(self) -> () {
122 unsafe {
123 let __receiver =
124 <UnitSelectMenuItemContent_2 as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
125 {
126 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
127 let __vi = *__vt.get(7usize).unwrap_or_else(|| {
128 panic!(
129 "unity: virtual slot {}
130 out of range (vtable len {}
131) on the runtime class behind {}
132 (method `{}
133`)",
134 7usize,
135 __vt.len(),
136 <UnitSelectMenuItemContent_2 as ::unity::ClassIdentity>::NAME,
137 "UpdateTextColor",
138 )
139 });
140 let __inner: extern "C" fn(UnitSelectMenuItemContent_2, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
141 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
142 __inner(__receiver, __mi)
143 }
144 }
145 }
146 #[doc = "`.ctor()` overload"]
147 fn ctor(self) -> () {
148 unsafe {
149 let __receiver =
150 <UnitSelectMenuItemContent_2 as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
151 ::unity::il2cpp_call!((::unity::module_base()+0x1c60bd0usize)as*mut u8,();
152(UnitSelectMenuItemContent_2)__receiver)
153 }
154 }
155}
156
157#[cfg(feature = "app-cooking_menu-unitselectmenuitemcontent_2")]
158impl<__T: IUnitSelectMenuItemContent_2> IUnitSelectMenuItemContent_2Methods for __T {}
159
160#[cfg(feature = "app-cooking_menu-unitselectmenuitemcontent_2")]
161impl UnitSelectMenuItemContent_2 {
162 pub fn get_text_mesh_pro_component_method_info() -> &'static ::unity::il2cpp::MethodInfo {
163 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
164 }
165
166 pub fn build_method_info() -> &'static ::unity::il2cpp::MethodInfo {
167 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
168 }
169
170 pub fn update_method_info() -> &'static ::unity::il2cpp::MethodInfo {
171 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
172 }
173
174 pub fn update_text_color_method_info() -> &'static ::unity::il2cpp::MethodInfo {
175 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
176 }
177
178 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
179 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
180 }
181}
182
183#[cfg(feature = "app-cooking_menu-unitselectmenuitemcontent_2")]
184impl UnitSelectMenuItemContent_2 {
185 #[doc = "Direct (non-virtual) call to `UnitSelectMenuItemContent_2`'s own `GetTextMeshProComponent`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
186 pub unsafe fn get_text_mesh_pro_component(
187 this: impl ::core::convert::Into<::unity::IlInstance>,
188 ) -> crate::tm_pro::textmeshprougui::TextMeshProUGUI {
189 let __mi = Self::get_text_mesh_pro_component_method_info();
190 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::tm_pro::textmeshprougui::TextMeshProUGUI =
191 ::core::mem::transmute(__mi.method_ptr);
192 __inner(this.into(), ::core::option::Option::None)
193 }
194
195 #[doc = "Direct (non-virtual) call to `UnitSelectMenuItemContent_2`'s own `Build`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
196 pub unsafe fn build(this: impl ::core::convert::Into<::unity::IlInstance>, menu_item: crate::app::basicmenuitem::BasicMenuItem) -> () {
197 let __mi = Self::build_method_info();
198 let __inner: extern "C" fn(::unity::IlInstance, crate::app::basicmenuitem::BasicMenuItem, ::unity::OptionalMethod) -> () =
199 ::core::mem::transmute(__mi.method_ptr);
200 __inner(this.into(), menu_item, ::core::option::Option::None)
201 }
202
203 #[doc = "Direct (non-virtual) call to `UnitSelectMenuItemContent_2`'s own `Update`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
204 pub unsafe fn update(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
205 let __mi = Self::update_method_info();
206 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
207 __inner(this.into(), ::core::option::Option::None)
208 }
209
210 #[doc = "Direct (non-virtual) call to `UnitSelectMenuItemContent_2`'s own `UpdateTextColor`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
211 pub unsafe fn update_text_color(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
212 let __mi = Self::update_text_color_method_info();
213 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
214 __inner(this.into(), ::core::option::Option::None)
215 }
216}
217
218#[cfg(feature = "app-cooking_menu-unitselectmenuitemcontent_2")]
219impl UnitSelectMenuItemContent_2 {
220 #[doc = "`.ctor()` — no args"]
221 pub fn new() -> Self {
222 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
223 panic!(
224 "{}
225::{}
226 failed to instantiate",
227 ::core::stringify!(UnitSelectMenuItemContent_2),
228 ::core::stringify!(new),
229 )
230 });
231 <Self as IUnitSelectMenuItemContent_2Methods>::ctor(this);
232 this
233 }
234}
235
236#[cfg(feature = "app-cooking_menu-unitselectmenuitemcontent_2")]
237#[doc(hidden)]
238pub mod prelude {
239 pub use super::{IUnitSelectMenuItemContent_2, IUnitSelectMenuItemContent_2Methods, UnitSelectMenuItemContent_2};
240 #[cfg(feature = "app-basicmenuitemcontent")]
241 pub use crate::app::basicmenuitemcontent::IBasicMenuItemContentMethods;
242 #[cfg(feature = "system-object")]
243 pub use crate::system::object::IObjectMethods;
244 #[cfg(feature = "unity_engine-behaviour")]
245 pub use crate::unity_engine::behaviour::IBehaviourMethods;
246 #[cfg(feature = "unity_engine-component")]
247 pub use crate::unity_engine::component::IComponentMethods;
248 #[cfg(feature = "unity_engine-monobehaviour")]
249 pub use crate::unity_engine::monobehaviour::IMonoBehaviourMethods;
250 #[cfg(feature = "unity_engine-object_2")]
251 pub use crate::unity_engine::object_2::IObject_2Methods;
252 pub use crate::{
253 app::basicmenuitemcontent::IBasicMenuItemContent,
254 system::object::IObject,
255 unity_engine::{behaviour::IBehaviour, component::IComponent, monobehaviour::IMonoBehaviour, object_2::IObject_2},
256 };
257}