1#[cfg(feature = "app-structproperty-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::{
9 object::{IObject, Object},
10 r#enum::{Enum, IEnum},
11 valuetype::{IValueType, ValueType},
12 };
13
14 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/structproperty/StructProperty.md"))]
15 #[::unity::class(namespace = "App", name = "StructProperty")]
16 #[parent(crate::system::object::Object)]
17 pub struct StructProperty {}
18
19 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/structproperty/StructProperty_Kind.md"))]
20 #[repr(C)]
21 #[derive(::core::clone::Clone, ::core::marker::Copy, ::core::fmt::Debug, ::core::cmp::PartialEq, ::core::cmp::Eq)]
22 pub struct StructProperty_Kind {
23 pub value: i32,
24 }
25 impl ::unity::ClassIdentity for StructProperty_Kind {
26 const NAME: &'static str = "StructProperty.Kind";
27 const NAMESPACE: &'static str = "App";
28
29 fn class() -> ::unity::Class {
30 static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
31 *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
32 }
33 }
34 impl ::unity::IlType for StructProperty_Kind {
35 fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
36 &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
37 }
38 }
39 impl StructProperty_Kind {
40 pub fn public_string() -> Self {
41 Self { value: 0 }
42 }
43
44 pub fn string() -> Self {
45 Self { value: 1 }
46 }
47
48 pub fn string_array() -> Self {
49 Self { value: 2 }
50 }
51
52 pub fn public_label() -> Self {
53 Self { value: 3 }
54 }
55
56 pub fn public_array() -> Self {
57 Self { value: 4 }
58 }
59
60 pub fn public_file() -> Self {
61 Self { value: 5 }
62 }
63
64 pub fn u8() -> Self {
65 Self { value: 6 }
66 }
67
68 pub fn u8_array() -> Self {
69 Self { value: 7 }
70 }
71
72 pub fn s8() -> Self {
73 Self { value: 8 }
74 }
75
76 pub fn s8_array() -> Self {
77 Self { value: 9 }
78 }
79
80 pub fn u16() -> Self {
81 Self { value: 10 }
82 }
83
84 pub fn s16() -> Self {
85 Self { value: 11 }
86 }
87
88 pub fn u32() -> Self {
89 Self { value: 12 }
90 }
91
92 pub fn s32() -> Self {
93 Self { value: 13 }
94 }
95
96 pub fn s32_array() -> Self {
97 Self { value: 14 }
98 }
99
100 pub fn u64() -> Self {
101 Self { value: 15 }
102 }
103
104 pub fn s64() -> Self {
105 Self { value: 16 }
106 }
107
108 pub fn f32() -> Self {
109 Self { value: 17 }
110 }
111
112 pub fn f32_array() -> Self {
113 Self { value: 18 }
114 }
115
116 pub fn bool() -> Self {
117 Self { value: 19 }
118 }
119
120 pub fn b8() -> Self {
121 Self { value: 20 }
122 }
123
124 pub fn b16() -> Self {
125 Self { value: 21 }
126 }
127
128 pub fn b32() -> Self {
129 Self { value: 22 }
130 }
131
132 pub fn b64() -> Self {
133 Self { value: 23 }
134 }
135
136 pub fn flag32() -> Self {
137 Self { value: 24 }
138 }
139
140 pub fn flag64() -> Self {
141 Self { value: 25 }
142 }
143
144 pub fn none() -> Self {
145 Self { value: 26 }
146 }
147 }
148}
149
150#[cfg(feature = "app-structproperty-types")]
151pub use __types::*;
152
153#[cfg(feature = "app-structproperty")]
154impl StructProperty {
155 #[doc = "`GetKind(::unity::Il2CppString)` overload"]
156 pub fn get_kind_2(name: impl ::core::convert::Into<::unity::Il2CppString>) -> crate::app::structproperty::StructProperty_Kind {
157 unsafe {
158 ::unity::il2cpp_call!((::unity::module_base()+0x250b260usize)as*mut u8,crate::app::structproperty::StructProperty_Kind;
159(::unity::Il2CppString)::core::convert::Into::into(name))
160 }
161 }
162
163 #[doc = "`CheckFlagKind(::unity::Il2CppString)` overload"]
164 pub fn check_flag_kind(kind: impl ::core::convert::Into<::unity::Il2CppString>) -> bool {
165 unsafe {
166 ::unity::il2cpp_call!((::unity::module_base()+0x250bb10usize)as*mut u8,bool;
167(::unity::Il2CppString)::core::convert::Into::into(kind))
168 }
169 }
170
171 #[doc = "`CheckReplaceKind(::unity::Il2CppString)` overload"]
172 pub fn check_replace_kind(kind: impl ::core::convert::Into<::unity::Il2CppString>) -> bool {
173 unsafe {
174 ::unity::il2cpp_call!((::unity::module_base()+0x250bb30usize)as*mut u8,bool;
175(::unity::Il2CppString)::core::convert::Into::into(kind))
176 }
177 }
178
179 #[doc = "`ReplaceKind(::unity::Il2CppString)` overload"]
180 pub fn replace_kind(kind: impl ::core::convert::Into<::unity::Il2CppString>) -> ::unity::Il2CppString {
181 unsafe {
182 ::unity::il2cpp_call!((::unity::module_base()+0x250bc10usize)as*mut u8, ::unity::Il2CppString;
183(::unity::Il2CppString)::core::convert::Into::into(kind))
184 }
185 }
186
187 #[doc = "`CheckIntFloatKind(::unity::Il2CppString)` overload"]
188 pub fn check_int_float_kind(kind: impl ::core::convert::Into<::unity::Il2CppString>) -> bool {
189 unsafe {
190 ::unity::il2cpp_call!((::unity::module_base()+0x250bd30usize)as*mut u8,bool;
191(::unity::Il2CppString)::core::convert::Into::into(kind))
192 }
193 }
194
195 #[doc = "`CheckArrayKind(::unity::Il2CppString)` overload"]
196 pub fn check_array_kind(kind: impl ::core::convert::Into<::unity::Il2CppString>) -> bool {
197 unsafe {
198 ::unity::il2cpp_call!((::unity::module_base()+0x250bd80usize)as*mut u8,bool;
199(::unity::Il2CppString)::core::convert::Into::into(kind))
200 }
201 }
202}
203
204#[cfg(feature = "app-structproperty")]
205pub trait IStructPropertyMethods: IStructProperty {
206 #[doc = "`get_kind()` overload"]
207 fn get_kind(self) -> crate::app::structproperty::StructProperty_Kind {
208 unsafe {
209 let __receiver = <StructProperty as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
210 ::unity::il2cpp_call!((::unity::module_base()+0x250b0f0usize)as*mut u8,crate::app::structproperty::StructProperty_Kind;
211(StructProperty)__receiver)
212 }
213 }
214 #[doc = "`set_kind(crate::app::structproperty::StructProperty_Kind)` overload"]
215 fn set_kind(self, value: impl ::core::convert::Into<crate::app::structproperty::StructProperty_Kind>) -> () {
216 unsafe {
217 let __receiver = <StructProperty as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
218 ::unity::il2cpp_call!((::unity::module_base()+0x250b100usize)as*mut u8,();
219(StructProperty)__receiver,(crate::app::structproperty::StructProperty_Kind)::core::convert::Into::into(value))
220 }
221 }
222 #[doc = "`get_property()` overload"]
223 fn get_property(self) -> crate::system::reflection::propertyinfo::PropertyInfo {
224 unsafe {
225 let __receiver = <StructProperty as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
226 ::unity::il2cpp_call!((::unity::module_base()+0x250b110usize)as*mut u8,crate::system::reflection::propertyinfo::PropertyInfo;
227(StructProperty)__receiver)
228 }
229 }
230 #[doc = "`set_property(crate::system::reflection::propertyinfo::PropertyInfo)` overload"]
231 fn set_property(self, value: impl ::core::convert::Into<crate::system::reflection::propertyinfo::PropertyInfo>) -> () {
232 unsafe {
233 let __receiver = <StructProperty as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
234 ::unity::il2cpp_call!((::unity::module_base()+0x250b120usize)as*mut u8,();
235(StructProperty)__receiver,(crate::system::reflection::propertyinfo::PropertyInfo)::core::convert::Into::into(value))
236 }
237 }
238 #[doc = "`get_objProperty()` overload"]
239 fn get_obj_property(self) -> crate::system::reflection::propertyinfo::PropertyInfo {
240 unsafe {
241 let __receiver = <StructProperty as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
242 ::unity::il2cpp_call!((::unity::module_base()+0x250b130usize)as*mut u8,crate::system::reflection::propertyinfo::PropertyInfo;
243(StructProperty)__receiver)
244 }
245 }
246 #[doc = "`set_objProperty(crate::system::reflection::propertyinfo::PropertyInfo)` overload"]
247 fn set_obj_property(self, value: impl ::core::convert::Into<crate::system::reflection::propertyinfo::PropertyInfo>) -> () {
248 unsafe {
249 let __receiver = <StructProperty as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
250 ::unity::il2cpp_call!((::unity::module_base()+0x250b140usize)as*mut u8,();
251(StructProperty)__receiver,(crate::system::reflection::propertyinfo::PropertyInfo)::core::convert::Into::into(value))
252 }
253 }
254 #[doc = "`get_isStruct()` overload"]
255 fn get_is_struct(self) -> bool {
256 unsafe {
257 let __receiver = <StructProperty as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
258 ::unity::il2cpp_call!((::unity::module_base()+0x250b150usize)as*mut u8,bool;
259(StructProperty)__receiver)
260 }
261 }
262 #[doc = "`set_isStruct(bool)` overload"]
263 fn set_is_struct(self, value: impl ::core::convert::Into<bool>) -> () {
264 unsafe {
265 let __receiver = <StructProperty as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
266 ::unity::il2cpp_call!((::unity::module_base()+0x250b160usize)as*mut u8,();
267(StructProperty)__receiver,(bool)::core::convert::Into::into(value))
268 }
269 }
270 #[doc = "`get_isSetter()` overload"]
271 fn get_is_setter(self) -> bool {
272 unsafe {
273 let __receiver = <StructProperty as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
274 ::unity::il2cpp_call!((::unity::module_base()+0x250b170usize)as*mut u8,bool;
275(StructProperty)__receiver)
276 }
277 }
278 #[doc = "`set_isSetter(bool)` overload"]
279 fn set_is_setter(self, value: impl ::core::convert::Into<bool>) -> () {
280 unsafe {
281 let __receiver = <StructProperty as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
282 ::unity::il2cpp_call!((::unity::module_base()+0x250b180usize)as*mut u8,();
283(StructProperty)__receiver,(bool)::core::convert::Into::into(value))
284 }
285 }
286 #[doc = "`get_setter()` overload"]
287 fn get_setter(self) -> crate::system::object::Object {
288 unsafe {
289 let __receiver = <StructProperty as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
290 ::unity::il2cpp_call!((::unity::module_base()+0x250b190usize)as*mut u8,crate::system::object::Object;
291(StructProperty)__receiver)
292 }
293 }
294 #[doc = "`set_setter(crate::system::object::Object)` overload"]
295 fn set_setter(self, value: impl ::core::convert::Into<crate::system::object::Object>) -> () {
296 unsafe {
297 let __receiver = <StructProperty as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
298 ::unity::il2cpp_call!((::unity::module_base()+0x250b1a0usize)as*mut u8,();
299(StructProperty)__receiver,(crate::system::object::Object)::core::convert::Into::into(value))
300 }
301 }
302 fn set_value<
303 M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity,
304 M1: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity,
305 >(
306 self,
307 obj: impl ::core::convert::Into<crate::system::object::Object>,
308 value: impl ::core::convert::Into<M1>,
309 ) -> () {
310 static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> =
311 ::std::sync::LazyLock::new(|| ::unity::lookup::method_info_on_class(<StructProperty as ::unity::ClassIdentity>::class(), "SetValue", 2));
312 #[allow(clippy::type_complexity)]
313 static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
314 ::std::sync::OnceLock::new();
315 let _ = false;
316 let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
317 ::core::result::Result::Ok(mi) => *mi,
318 ::core::result::Result::Err(e) => {
319 panic!(
320 "method lookup failed: {}
321::{}
322: {}
323",
324 <StructProperty as ::unity::ClassIdentity>::NAME,
325 "SetValue",
326 e
327 )
328 },
329 };
330 let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
331 let __key: usize = (<M0 as ::unity::IlType>::il_type() as *const _ as usize) ^ (<M1 as ::unity::IlType>::il_type() as *const _ as usize);
332 let __inflated: &'static ::unity::il2cpp::MethodInfo = {
333 let mut __guard = __cache.lock().unwrap();
334 *__guard.entry(__key).or_insert_with(|| {
335 ::unity::il2cpp::generic::create_generic_method_info(__open, &[
336 <M0 as ::unity::IlType>::il_type(),
337 <M1 as ::unity::IlType>::il_type(),
338 ])
339 })
340 };
341 unsafe {
342 let __receiver = <StructProperty as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
343 let __f: extern "C" fn(StructProperty, crate::system::object::Object, M1, ::unity::OptionalMethod) -> () =
344 ::core::mem::transmute(__inflated.method_ptr);
345 let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
346 __f(
347 __receiver,
348 ::core::convert::Into::into(obj),
349 ::core::convert::Into::into(value),
350 ::core::option::Option::Some(__mi_opaque),
351 )
352 }
353 }
354 #[doc = "`SetValue(crate::system::object::Object, crate::system::object::Object)` overload"]
355 fn set_value_2(
356 self,
357 obj: impl ::core::convert::Into<crate::system::object::Object>,
358 value: impl ::core::convert::Into<crate::system::object::Object>,
359 ) -> () {
360 unsafe {
361 let __receiver = <StructProperty as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
362 ::unity::il2cpp_call!((::unity::module_base()+0x250b240usize)as*mut u8,();
363(StructProperty)__receiver,(crate::system::object::Object)::core::convert::Into::into(obj),(crate::system::object::Object)::core::convert::Into::into(value))
364 }
365 }
366 #[doc = "`.ctor()` overload"]
367 fn ctor(self) -> () {
368 unsafe {
369 let __receiver = <StructProperty as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
370 ::unity::il2cpp_call!((::unity::module_base()+0x250bdd0usize)as*mut u8,();
371(StructProperty)__receiver)
372 }
373 }
374}
375
376#[cfg(feature = "app-structproperty")]
377impl<__T: IStructProperty> IStructPropertyMethods for __T {}
378
379#[cfg(feature = "app-structproperty")]
380impl StructProperty {
381 pub fn get_kind_method_info() -> &'static ::unity::il2cpp::MethodInfo {
382 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
383 }
384
385 pub fn set_kind_method_info() -> &'static ::unity::il2cpp::MethodInfo {
386 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
387 }
388
389 pub fn get_property_method_info() -> &'static ::unity::il2cpp::MethodInfo {
390 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
391 }
392
393 pub fn set_property_method_info() -> &'static ::unity::il2cpp::MethodInfo {
394 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
395 }
396
397 pub fn get_obj_property_method_info() -> &'static ::unity::il2cpp::MethodInfo {
398 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
399 }
400
401 pub fn set_obj_property_method_info() -> &'static ::unity::il2cpp::MethodInfo {
402 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
403 }
404
405 pub fn get_is_struct_method_info() -> &'static ::unity::il2cpp::MethodInfo {
406 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
407 }
408
409 pub fn set_is_struct_method_info() -> &'static ::unity::il2cpp::MethodInfo {
410 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
411 }
412
413 pub fn get_is_setter_method_info() -> &'static ::unity::il2cpp::MethodInfo {
414 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
415 }
416
417 pub fn set_is_setter_method_info() -> &'static ::unity::il2cpp::MethodInfo {
418 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
419 }
420
421 pub fn get_setter_method_info() -> &'static ::unity::il2cpp::MethodInfo {
422 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
423 }
424
425 pub fn set_setter_method_info() -> &'static ::unity::il2cpp::MethodInfo {
426 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
427 }
428
429 pub fn set_value_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
430 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
431 }
432
433 pub fn get_kind_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
434 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[17]
435 }
436
437 pub fn check_flag_kind_method_info() -> &'static ::unity::il2cpp::MethodInfo {
438 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[18]
439 }
440
441 pub fn check_replace_kind_method_info() -> &'static ::unity::il2cpp::MethodInfo {
442 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[19]
443 }
444
445 pub fn replace_kind_method_info() -> &'static ::unity::il2cpp::MethodInfo {
446 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[20]
447 }
448
449 pub fn check_int_float_kind_method_info() -> &'static ::unity::il2cpp::MethodInfo {
450 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[21]
451 }
452
453 pub fn check_array_kind_method_info() -> &'static ::unity::il2cpp::MethodInfo {
454 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[22]
455 }
456
457 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
458 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[23]
459 }
460}
461
462#[cfg(feature = "app-structproperty")]
463impl StructProperty {
464 #[doc = "`.ctor()` — no args"]
465 pub fn new() -> Self {
466 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
467 panic!(
468 "{}
469::{}
470 failed to instantiate",
471 ::core::stringify!(StructProperty),
472 ::core::stringify!(new),
473 )
474 });
475 <Self as IStructPropertyMethods>::ctor(this);
476 this
477 }
478}
479
480#[cfg(feature = "app-structproperty")]
481#[doc(hidden)]
482pub mod prelude {
483 pub use super::{IStructProperty, IStructPropertyMethods, StructProperty, StructProperty_Kind};
484 #[cfg(feature = "system-object")]
485 pub use crate::system::object::IObjectMethods;
486 #[cfg(feature = "system-enum")]
487 pub use crate::system::r#enum::IEnumMethods;
488 #[cfg(feature = "system-valuetype")]
489 pub use crate::system::valuetype::IValueTypeMethods;
490 pub use crate::system::{object::IObject, r#enum::IEnum, valuetype::IValueType};
491}