engage/generated/app/
datatypesextension.rs1#[cfg(feature = "app-datatypesextension-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/app/datatypesextension/DataTypesExtension.md"))]
11 #[::unity::class(namespace = "App", name = "DataTypesExtension")]
12 #[parent(crate::system::object::Object)]
13 pub struct DataTypesExtension {
14 #[static_field]
15 #[rename(name = "DifficultyMidTable")]
16 pub difficulty_mid_table: ::unity::Array<::unity::Il2CppString>,
17 #[static_field]
18 #[rename(name = "GameModeMidTable")]
19 pub game_mode_mid_table: ::unity::Array<::unity::Il2CppString>,
20 #[static_field]
21 #[rename(name = "GrowModeMidTable")]
22 pub grow_mode_mid_table: ::unity::Array<::unity::Il2CppString>,
23 #[static_field]
24 #[rename(name = "DifficultyLabelTable")]
25 pub difficulty_label_table: ::unity::Array<::unity::Il2CppString>,
26 #[static_field]
27 #[rename(name = "GameModeLabelTable")]
28 pub game_mode_label_table: ::unity::Array<::unity::Il2CppString>,
29 }
30}
31
32#[cfg(feature = "app-datatypesextension-types")]
33pub use __types::*;
34
35#[cfg(feature = "app-datatypesextension")]
36impl DataTypesExtension {
37 #[doc = "`GetName(crate::app::difficulty::Difficulty)` overload"]
38 pub fn get_name(difficulty: impl ::core::convert::Into<crate::app::difficulty::Difficulty>) -> ::unity::Il2CppString {
39 unsafe {
40 ::unity::il2cpp_call!((::unity::module_base()+0x29fe240usize)as*mut u8, ::unity::Il2CppString;
41(crate::app::difficulty::Difficulty)::core::convert::Into::into(difficulty))
42 }
43 }
44
45 #[doc = "`GetName(crate::app::gamemode::GameMode)` overload"]
46 pub fn get_name_2(game_mode: impl ::core::convert::Into<crate::app::gamemode::GameMode>) -> ::unity::Il2CppString {
47 unsafe {
48 ::unity::il2cpp_call!((::unity::module_base()+0x29fe310usize)as*mut u8, ::unity::Il2CppString;
49(crate::app::gamemode::GameMode)::core::convert::Into::into(game_mode))
50 }
51 }
52
53 #[doc = "`GetName(crate::app::growmode::GrowMode)` overload"]
54 pub fn get_name_3(grow_mode: impl ::core::convert::Into<crate::app::growmode::GrowMode>) -> ::unity::Il2CppString {
55 unsafe {
56 ::unity::il2cpp_call!((::unity::module_base()+0x29fe3e0usize)as*mut u8, ::unity::Il2CppString;
57(crate::app::growmode::GrowMode)::core::convert::Into::into(grow_mode))
58 }
59 }
60
61 #[doc = "`GetName(crate::app::gender::Gender)` overload"]
62 pub fn get_name_4(gender: impl ::core::convert::Into<crate::app::gender::Gender>) -> ::unity::Il2CppString {
63 unsafe {
64 ::unity::il2cpp_call!((::unity::module_base()+0x29fe4b0usize)as*mut u8, ::unity::Il2CppString;
65(crate::app::gender::Gender)::core::convert::Into::into(gender))
66 }
67 }
68
69 #[doc = "`GetLabel(crate::app::difficulty::Difficulty)` overload"]
70 pub fn get_label(difficulty: impl ::core::convert::Into<crate::app::difficulty::Difficulty>) -> ::unity::Il2CppString {
71 unsafe {
72 ::unity::il2cpp_call!((::unity::module_base()+0x29fe530usize)as*mut u8, ::unity::Il2CppString;
73(crate::app::difficulty::Difficulty)::core::convert::Into::into(difficulty))
74 }
75 }
76
77 #[doc = "`GetLabel(crate::app::gamemode::GameMode)` overload"]
78 pub fn get_label_2(game_mode: impl ::core::convert::Into<crate::app::gamemode::GameMode>) -> ::unity::Il2CppString {
79 unsafe {
80 ::unity::il2cpp_call!((::unity::module_base()+0x29fe5c0usize)as*mut u8, ::unity::Il2CppString;
81(crate::app::gamemode::GameMode)::core::convert::Into::into(game_mode))
82 }
83 }
84
85 #[doc = "`IsNullOrEmpty(crate::app::unit::Unit)` overload"]
86 pub fn is_null_or_empty(unit: impl ::core::convert::Into<crate::app::unit::Unit>) -> bool {
87 unsafe {
88 ::unity::il2cpp_call!((::unity::module_base()+0x29fe650usize)as*mut u8,bool;
89(crate::app::unit::Unit)::core::convert::Into::into(unit))
90 }
91 }
92
93 #[doc = "`IsNullOrEmpty(::unity::Il2CppString)` overload"]
94 pub fn is_null_or_empty_2(str: impl ::core::convert::Into<::unity::Il2CppString>) -> bool {
95 unsafe {
96 ::unity::il2cpp_call!((::unity::module_base()+0x29fe670usize)as*mut u8,bool;
97(::unity::Il2CppString)::core::convert::Into::into(str))
98 }
99 }
100
101 pub fn try_get_component<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
102 go: impl ::core::convert::Into<crate::unity_engine::gameobject::GameObject>,
103 ) -> M0 {
104 static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
105 ::unity::lookup::method_info_on_class(<DataTypesExtension as ::unity::ClassIdentity>::class(), "TryGetComponent", 1)
106 });
107 #[allow(clippy::type_complexity)]
108 static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
109 ::std::sync::OnceLock::new();
110 let _ = true;
111 let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
112 ::core::result::Result::Ok(mi) => *mi,
113 ::core::result::Result::Err(e) => {
114 panic!(
115 "method lookup failed: {}
116::{}
117: {}
118",
119 <DataTypesExtension as ::unity::ClassIdentity>::NAME,
120 "TryGetComponent",
121 e
122 )
123 },
124 };
125 let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
126 let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
127 let __inflated: &'static ::unity::il2cpp::MethodInfo = {
128 let mut __guard = __cache.lock().unwrap();
129 *__guard
130 .entry(__key)
131 .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
132 };
133 unsafe {
134 let __f: extern "C" fn(crate::unity_engine::gameobject::GameObject, ::unity::OptionalMethod) -> M0 =
135 ::core::mem::transmute(__inflated.method_ptr);
136 let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
137 __f(::core::convert::Into::into(go), ::core::option::Option::Some(__mi_opaque))
138 }
139 }
140
141 pub fn try_get_component_2<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
142 component: impl ::core::convert::Into<crate::unity_engine::component::Component>,
143 ) -> M0 {
144 static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
145 ::unity::lookup::method_info_on_class(<DataTypesExtension as ::unity::ClassIdentity>::class(), "TryGetComponent", 1)
146 });
147 #[allow(clippy::type_complexity)]
148 static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
149 ::std::sync::OnceLock::new();
150 let _ = true;
151 let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
152 ::core::result::Result::Ok(mi) => *mi,
153 ::core::result::Result::Err(e) => {
154 panic!(
155 "method lookup failed: {}
156::{}
157: {}
158",
159 <DataTypesExtension as ::unity::ClassIdentity>::NAME,
160 "TryGetComponent",
161 e
162 )
163 },
164 };
165 let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
166 let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
167 let __inflated: &'static ::unity::il2cpp::MethodInfo = {
168 let mut __guard = __cache.lock().unwrap();
169 *__guard
170 .entry(__key)
171 .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
172 };
173 unsafe {
174 let __f: extern "C" fn(crate::unity_engine::component::Component, ::unity::OptionalMethod) -> M0 =
175 ::core::mem::transmute(__inflated.method_ptr);
176 let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
177 __f(::core::convert::Into::into(component), ::core::option::Option::Some(__mi_opaque))
178 }
179 }
180
181 #[doc = "`.cctor()` overload"]
182 pub fn cctor() -> () {
183 unsafe {
184 ::unity::il2cpp_call!((::unity::module_base()+0x29fe680usize)as*mut u8,();
185 )
186 }
187 }
188}
189
190#[cfg(feature = "app-datatypesextension")]
191impl DataTypesExtension {
192 pub fn get_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
193 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
194 }
195
196 pub fn get_name_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
197 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
198 }
199
200 pub fn get_name_3_method_info() -> &'static ::unity::il2cpp::MethodInfo {
201 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
202 }
203
204 pub fn get_name_4_method_info() -> &'static ::unity::il2cpp::MethodInfo {
205 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
206 }
207
208 pub fn get_label_method_info() -> &'static ::unity::il2cpp::MethodInfo {
209 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
210 }
211
212 pub fn get_label_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
213 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
214 }
215
216 pub fn is_null_or_empty_method_info() -> &'static ::unity::il2cpp::MethodInfo {
217 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
218 }
219
220 pub fn is_null_or_empty_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
221 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
222 }
223
224 pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
225 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
226 }
227}
228
229#[cfg(feature = "app-datatypesextension")]
230#[doc(hidden)]
231pub mod prelude {
232 pub use super::{DataTypesExtension, IDataTypesExtension};
233 pub use crate::system::object::IObject;
234 #[cfg(feature = "system-object")]
235 pub use crate::system::object::IObjectMethods;
236}