Skip to main content

engage/generated/app/
scriptutil.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "app-scriptutil-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/scriptutil/ScriptUtil.md"))]
15    #[::unity::class(namespace = "App", name = "ScriptUtil")]
16    #[parent(crate::system::object::Object)]
17    pub struct ScriptUtil {
18        #[static_field]
19        #[rename(name = "MAX_CURSOR_STACK")]
20        pub max_cursor_stack: i32,
21    }
22
23    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/scriptutil/ScriptUtil_MenuCondtion.md"))]
24    #[repr(C)]
25    #[derive(::core::clone::Clone, ::core::marker::Copy, ::core::fmt::Debug, ::core::cmp::PartialEq, ::core::cmp::Eq)]
26    pub struct ScriptUtil_MenuCondtion {
27        pub value: i32,
28    }
29    impl ::unity::ClassIdentity for ScriptUtil_MenuCondtion {
30        const NAME: &'static str = "ScriptUtil.MenuCondtion";
31        const NAMESPACE: &'static str = "App";
32
33        fn class() -> ::unity::Class {
34            static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
35            *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
36        }
37    }
38    impl ::unity::IlType for ScriptUtil_MenuCondtion {
39        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
40            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
41        }
42    }
43    impl ScriptUtil_MenuCondtion {
44        pub fn hide() -> Self {
45            Self { value: 0 }
46        }
47
48        pub fn enable() -> Self {
49            Self { value: 1 }
50        }
51
52        pub fn disable() -> Self {
53            Self { value: 2 }
54        }
55    }
56}
57
58#[cfg(feature = "app-scriptutil-types")]
59pub use __types::*;
60
61#[cfg(feature = "app-scriptutil")]
62impl ScriptUtil {
63    #[doc = "`GetInt(crate::moon_sharp::interpreter::dynvalue::DynValue)` overload"]
64    pub fn get_int(value: impl ::core::convert::Into<crate::moon_sharp::interpreter::dynvalue::DynValue>) -> i32 {
65        unsafe {
66            ::unity::il2cpp_call!((::unity::module_base()+0x21a3060usize)as*mut u8,i32;
67(crate::moon_sharp::interpreter::dynvalue::DynValue)::core::convert::Into::into(value))
68        }
69    }
70
71    #[doc = "`GetFloat(crate::moon_sharp::interpreter::dynvalue::DynValue)` overload"]
72    pub fn get_float(value: impl ::core::convert::Into<crate::moon_sharp::interpreter::dynvalue::DynValue>) -> f32 {
73        unsafe {
74            ::unity::il2cpp_call!((::unity::module_base()+0x21a31c0usize)as*mut u8,f32;
75(crate::moon_sharp::interpreter::dynvalue::DynValue)::core::convert::Into::into(value))
76        }
77    }
78
79    #[doc = "`GetString(crate::moon_sharp::interpreter::dynvalue::DynValue)` overload"]
80    pub fn get_string(value: impl ::core::convert::Into<crate::moon_sharp::interpreter::dynvalue::DynValue>) -> ::unity::Il2CppString {
81        unsafe {
82            ::unity::il2cpp_call!((::unity::module_base()+0x21a3310usize)as*mut u8, ::unity::Il2CppString;
83(crate::moon_sharp::interpreter::dynvalue::DynValue)::core::convert::Into::into(value))
84        }
85    }
86
87    #[doc = "`GetBool(crate::moon_sharp::interpreter::dynvalue::DynValue)` overload"]
88    pub fn get_bool(value: impl ::core::convert::Into<crate::moon_sharp::interpreter::dynvalue::DynValue>) -> bool {
89        unsafe {
90            ::unity::il2cpp_call!((::unity::module_base()+0x21a34c0usize)as*mut u8,bool;
91(crate::moon_sharp::interpreter::dynvalue::DynValue)::core::convert::Into::into(value))
92        }
93    }
94
95    #[doc = "`IsString(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>, i32)` overload"]
96    pub fn is_string(
97        args: impl ::core::convert::Into<::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>>,
98        index: impl ::core::convert::Into<i32>,
99    ) -> bool {
100        unsafe {
101            ::unity::il2cpp_call!((::unity::module_base()+0x219ce70usize)as*mut u8,bool;
102(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>)::core::convert::Into::into(args),(i32)::core::convert::Into::into(index))
103        }
104    }
105
106    #[doc = "`TryGetType(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>, i32)` overload"]
107    pub fn try_get_type(
108        args: impl ::core::convert::Into<::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>>,
109        index: impl ::core::convert::Into<i32>,
110    ) -> crate::moon_sharp::interpreter::datatype::DataType {
111        unsafe {
112            ::unity::il2cpp_call!((::unity::module_base()+0x21a3620usize)as*mut u8,crate::moon_sharp::interpreter::datatype::DataType;
113(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>)::core::convert::Into::into(args),(i32)::core::convert::Into::into(index))
114        }
115    }
116
117    #[doc = "`TryGetInt(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>, i32, i32)` overload"]
118    pub fn try_get_int(
119        args: impl ::core::convert::Into<::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>>,
120        index: impl ::core::convert::Into<i32>,
121        nothing: impl ::core::convert::Into<i32>,
122    ) -> i32 {
123        unsafe {
124            ::unity::il2cpp_call!((::unity::module_base()+0x2196cd0usize)as*mut u8,i32;
125(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>)::core::convert::Into::into(args),(i32)::core::convert::Into::into(index),(i32)::core::convert::Into::into(nothing))
126        }
127    }
128
129    #[doc = "`TryGetFloat(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>, i32, f32)` overload"]
130    pub fn try_get_float(
131        args: impl ::core::convert::Into<::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>>,
132        index: impl ::core::convert::Into<i32>,
133        nothing: impl ::core::convert::Into<f32>,
134    ) -> f32 {
135        unsafe {
136            ::unity::il2cpp_call!((::unity::module_base()+0x219efd0usize)as*mut u8,f32;
137(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>)::core::convert::Into::into(args),(i32)::core::convert::Into::into(index),(f32)::core::convert::Into::into(nothing))
138        }
139    }
140
141    #[doc = "`TryGetHash(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>, i32, i32)` overload"]
142    pub fn try_get_hash(
143        args: impl ::core::convert::Into<::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>>,
144        index: impl ::core::convert::Into<i32>,
145        nothing: impl ::core::convert::Into<i32>,
146    ) -> i32 {
147        unsafe {
148            ::unity::il2cpp_call!((::unity::module_base()+0x21a3670usize)as*mut u8,i32;
149(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>)::core::convert::Into::into(args),(i32)::core::convert::Into::into(index),(i32)::core::convert::Into::into(nothing))
150        }
151    }
152
153    #[doc = "`TryGetString(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>, i32, ::unity::Il2CppString)` overload"]
154    pub fn try_get_string(
155        args: impl ::core::convert::Into<::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>>,
156        index: impl ::core::convert::Into<i32>,
157        nothing: impl ::core::convert::Into<::unity::Il2CppString>,
158    ) -> ::unity::Il2CppString {
159        unsafe {
160            ::unity::il2cpp_call!((::unity::module_base()+0x2196920usize)as*mut u8, ::unity::Il2CppString;
161(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>)::core::convert::Into::into(args),(i32)::core::convert::Into::into(index),(::unity::Il2CppString)::core::convert::Into::into(nothing))
162        }
163    }
164
165    #[doc = "`TryGetBool(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>, i32, bool)` overload"]
166    pub fn try_get_bool(
167        args: impl ::core::convert::Into<::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>>,
168        index: impl ::core::convert::Into<i32>,
169        nothing: impl ::core::convert::Into<bool>,
170    ) -> bool {
171        unsafe {
172            ::unity::il2cpp_call!((::unity::module_base()+0x21977b0usize)as*mut u8,bool;
173(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>)::core::convert::Into::into(args),(i32)::core::convert::Into::into(index),(bool)::core::convert::Into::into(nothing))
174        }
175    }
176
177    #[doc = "`TryGetForce(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>, i32, crate::app::force::Force_Type)` overload"]
178    pub fn try_get_force(
179        args: impl ::core::convert::Into<::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>>,
180        index: impl ::core::convert::Into<i32>,
181        nothing: impl ::core::convert::Into<crate::app::force::Force_Type>,
182    ) -> crate::app::force::Force_Type {
183        unsafe {
184            ::unity::il2cpp_call!((::unity::module_base()+0x2195ff0usize)as*mut u8,crate::app::force::Force_Type;
185(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>)::core::convert::Into::into(args),(i32)::core::convert::Into::into(index),(crate::app::force::Force_Type)::core::convert::Into::into(nothing))
186        }
187    }
188
189    pub fn try_get_data<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
190        args: impl ::core::convert::Into<::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>>,
191        index: impl ::core::convert::Into<i32>,
192        nothing: impl ::core::convert::Into<M0>,
193    ) -> M0 {
194        static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> =
195            ::std::sync::LazyLock::new(|| ::unity::lookup::method_info_on_class(<ScriptUtil as ::unity::ClassIdentity>::class(), "TryGetData", 3));
196        #[allow(clippy::type_complexity)]
197        static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
198            ::std::sync::OnceLock::new();
199        let _ = true;
200        let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
201            ::core::result::Result::Ok(mi) => *mi,
202            ::core::result::Result::Err(e) => {
203                panic!(
204                    "method lookup failed: {}
205::{}
206: {}
207",
208                    <ScriptUtil as ::unity::ClassIdentity>::NAME,
209                    "TryGetData",
210                    e
211                )
212            },
213        };
214        let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
215        let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
216        let __inflated: &'static ::unity::il2cpp::MethodInfo = {
217            let mut __guard = __cache.lock().unwrap();
218            *__guard
219                .entry(__key)
220                .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
221        };
222        unsafe {
223            let __f: extern "C" fn(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>, i32, M0, ::unity::OptionalMethod) -> M0 =
224                ::core::mem::transmute(__inflated.method_ptr);
225            let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
226            __f(
227                ::core::convert::Into::into(args),
228                ::core::convert::Into::into(index),
229                ::core::convert::Into::into(nothing),
230                ::core::option::Option::Some(__mi_opaque),
231            )
232        }
233    }
234
235    #[doc = "`TryGetUnit(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>, i32, bool)` overload"]
236    pub fn try_get_unit(
237        args: impl ::core::convert::Into<::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>>,
238        index: impl ::core::convert::Into<i32>,
239        warning: impl ::core::convert::Into<bool>,
240    ) -> crate::app::unit::Unit {
241        unsafe {
242            ::unity::il2cpp_call!((::unity::module_base()+0x21961f0usize)as*mut u8,crate::app::unit::Unit;
243(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>)::core::convert::Into::into(args),(i32)::core::convert::Into::into(index),(bool)::core::convert::Into::into(warning))
244        }
245    }
246
247    #[doc = "`TryMapGetUnit(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>, i32, bool)` overload"]
248    pub fn try_map_get_unit(
249        args: impl ::core::convert::Into<::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>>,
250        index: impl ::core::convert::Into<i32>,
251        warning: impl ::core::convert::Into<bool>,
252    ) -> crate::app::unit::Unit {
253        unsafe {
254            ::unity::il2cpp_call!((::unity::module_base()+0x2197cc0usize)as*mut u8,crate::app::unit::Unit;
255(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>)::core::convert::Into::into(args),(i32)::core::convert::Into::into(index),(bool)::core::convert::Into::into(warning))
256        }
257    }
258
259    #[doc = "`TryGetGodUnit(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>, i32, bool)` overload"]
260    pub fn try_get_god_unit(
261        args: impl ::core::convert::Into<::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>>,
262        index: impl ::core::convert::Into<i32>,
263        warning: impl ::core::convert::Into<bool>,
264    ) -> crate::app::godunit::GodUnit {
265        unsafe {
266            ::unity::il2cpp_call!((::unity::module_base()+0x21a0470usize)as*mut u8,crate::app::godunit::GodUnit;
267(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>)::core::convert::Into::into(args),(i32)::core::convert::Into::into(index),(bool)::core::convert::Into::into(warning))
268        }
269    }
270
271    #[doc = "`TryGetItem(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>, i32, bool)` overload"]
272    pub fn try_get_item(
273        args: impl ::core::convert::Into<::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>>,
274        index: impl ::core::convert::Into<i32>,
275        warning: impl ::core::convert::Into<bool>,
276    ) -> crate::app::itemdata::ItemData {
277        unsafe {
278            ::unity::il2cpp_call!((::unity::module_base()+0x21a3740usize)as*mut u8,crate::app::itemdata::ItemData;
279(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>)::core::convert::Into::into(args),(i32)::core::convert::Into::into(index),(bool)::core::convert::Into::into(warning))
280        }
281    }
282
283    #[doc = "`TryGetFunc(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>, i32)` overload"]
284    pub fn try_get_func(
285        args: impl ::core::convert::Into<::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>>,
286        index: impl ::core::convert::Into<i32>,
287    ) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
288        unsafe {
289            ::unity::il2cpp_call!((::unity::module_base()+0x21a3890usize)as*mut u8,crate::moon_sharp::interpreter::dynvalue::DynValue;
290(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>)::core::convert::Into::into(args),(i32)::core::convert::Into::into(index))
291        }
292    }
293
294    #[doc = "`TryGetValue(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>, i32)` overload"]
295    pub fn try_get_value(
296        args: impl ::core::convert::Into<::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>>,
297        index: impl ::core::convert::Into<i32>,
298    ) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
299        unsafe {
300            ::unity::il2cpp_call!((::unity::module_base()+0x21a3970usize)as*mut u8,crate::moon_sharp::interpreter::dynvalue::DynValue;
301(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>)::core::convert::Into::into(args),(i32)::core::convert::Into::into(index))
302        }
303    }
304
305    #[doc = "`TryGetArgs(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>, i32)` overload"]
306    pub fn try_get_args(
307        args: impl ::core::convert::Into<::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>>,
308        index: impl ::core::convert::Into<i32>,
309    ) -> ::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue> {
310        unsafe {
311            ::unity::il2cpp_call!((::unity::module_base()+0x21a39b0usize)as*mut u8, ::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue> ;
312(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>)::core::convert::Into::into(args),(i32)::core::convert::Into::into(index))
313        }
314    }
315
316    pub fn try_get_index<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
317        args: impl ::core::convert::Into<::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>>,
318        index: impl ::core::convert::Into<i32>,
319    ) -> i32 {
320        static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> =
321            ::std::sync::LazyLock::new(|| ::unity::lookup::method_info_on_class(<ScriptUtil as ::unity::ClassIdentity>::class(), "TryGetIndex", 2));
322        #[allow(clippy::type_complexity)]
323        static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
324            ::std::sync::OnceLock::new();
325        let _ = true;
326        let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
327            ::core::result::Result::Ok(mi) => *mi,
328            ::core::result::Result::Err(e) => {
329                panic!(
330                    "method lookup failed: {}
331::{}
332: {}
333",
334                    <ScriptUtil as ::unity::ClassIdentity>::NAME,
335                    "TryGetIndex",
336                    e
337                )
338            },
339        };
340        let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
341        let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
342        let __inflated: &'static ::unity::il2cpp::MethodInfo = {
343            let mut __guard = __cache.lock().unwrap();
344            *__guard
345                .entry(__key)
346                .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
347        };
348        unsafe {
349            let __f: extern "C" fn(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>, i32, ::unity::OptionalMethod) -> i32 =
350                ::core::mem::transmute(__inflated.method_ptr);
351            let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
352            __f(
353                ::core::convert::Into::into(args),
354                ::core::convert::Into::into(index),
355                ::core::option::Option::Some(__mi_opaque),
356            )
357        }
358    }
359
360    pub fn try_get_user_data<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
361        args: impl ::core::convert::Into<::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>>,
362        index: impl ::core::convert::Into<i32>,
363    ) -> M0 {
364        static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
365            ::unity::lookup::method_info_on_class(<ScriptUtil as ::unity::ClassIdentity>::class(), "TryGetUserData", 2)
366        });
367        #[allow(clippy::type_complexity)]
368        static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
369            ::std::sync::OnceLock::new();
370        let _ = true;
371        let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
372            ::core::result::Result::Ok(mi) => *mi,
373            ::core::result::Result::Err(e) => {
374                panic!(
375                    "method lookup failed: {}
376::{}
377: {}
378",
379                    <ScriptUtil as ::unity::ClassIdentity>::NAME,
380                    "TryGetUserData",
381                    e
382                )
383            },
384        };
385        let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
386        let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
387        let __inflated: &'static ::unity::il2cpp::MethodInfo = {
388            let mut __guard = __cache.lock().unwrap();
389            *__guard
390                .entry(__key)
391                .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
392        };
393        unsafe {
394            let __f: extern "C" fn(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>, i32, ::unity::OptionalMethod) -> M0 =
395                ::core::mem::transmute(__inflated.method_ptr);
396            let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
397            __f(
398                ::core::convert::Into::into(args),
399                ::core::convert::Into::into(index),
400                ::core::option::Option::Some(__mi_opaque),
401            )
402        }
403    }
404
405    #[doc = "`TryGetGameObject(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>, i32)` overload"]
406    pub fn try_get_game_object(
407        args: impl ::core::convert::Into<::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>>,
408        index: impl ::core::convert::Into<i32>,
409    ) -> crate::unity_engine::gameobject::GameObject {
410        unsafe {
411            ::unity::il2cpp_call!((::unity::module_base()+0x21a3ae0usize)as*mut u8,crate::unity_engine::gameobject::GameObject;
412(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>)::core::convert::Into::into(args),(i32)::core::convert::Into::into(index))
413        }
414    }
415
416    pub fn try_get_component<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
417        args: impl ::core::convert::Into<::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>>,
418        index: impl ::core::convert::Into<i32>,
419    ) -> M0 {
420        static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
421            ::unity::lookup::method_info_on_class(<ScriptUtil as ::unity::ClassIdentity>::class(), "TryGetComponent", 2)
422        });
423        #[allow(clippy::type_complexity)]
424        static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
425            ::std::sync::OnceLock::new();
426        let _ = true;
427        let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
428            ::core::result::Result::Ok(mi) => *mi,
429            ::core::result::Result::Err(e) => {
430                panic!(
431                    "method lookup failed: {}
432::{}
433: {}
434",
435                    <ScriptUtil as ::unity::ClassIdentity>::NAME,
436                    "TryGetComponent",
437                    e
438                )
439            },
440        };
441        let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
442        let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
443        let __inflated: &'static ::unity::il2cpp::MethodInfo = {
444            let mut __guard = __cache.lock().unwrap();
445            *__guard
446                .entry(__key)
447                .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
448        };
449        unsafe {
450            let __f: extern "C" fn(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>, i32, ::unity::OptionalMethod) -> M0 =
451                ::core::mem::transmute(__inflated.method_ptr);
452            let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
453            __f(
454                ::core::convert::Into::into(args),
455                ::core::convert::Into::into(index),
456                ::core::option::Option::Some(__mi_opaque),
457            )
458        }
459    }
460
461    pub fn try_get_components<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
462        args: impl ::core::convert::Into<::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>>,
463        index: impl ::core::convert::Into<i32>,
464    ) -> ::unity::Array<M0> {
465        static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
466            ::unity::lookup::method_info_on_class(<ScriptUtil as ::unity::ClassIdentity>::class(), "TryGetComponents", 2)
467        });
468        #[allow(clippy::type_complexity)]
469        static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
470            ::std::sync::OnceLock::new();
471        let _ = true;
472        let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
473            ::core::result::Result::Ok(mi) => *mi,
474            ::core::result::Result::Err(e) => {
475                panic!(
476                    "method lookup failed: {}
477::{}
478: {}
479",
480                    <ScriptUtil as ::unity::ClassIdentity>::NAME,
481                    "TryGetComponents",
482                    e
483                )
484            },
485        };
486        let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
487        let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
488        let __inflated: &'static ::unity::il2cpp::MethodInfo = {
489            let mut __guard = __cache.lock().unwrap();
490            *__guard
491                .entry(__key)
492                .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
493        };
494        unsafe {
495            let __f: extern "C" fn(
496                ::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>,
497                i32,
498                ::unity::OptionalMethod,
499            ) -> ::unity::Array<M0> = ::core::mem::transmute(__inflated.method_ptr);
500            let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
501            __f(
502                ::core::convert::Into::into(args),
503                ::core::convert::Into::into(index),
504                ::core::option::Option::Some(__mi_opaque),
505            )
506        }
507    }
508
509    #[doc = "`TryGetLocator(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>, i32)` overload"]
510    pub fn try_get_locator(
511        args: impl ::core::convert::Into<::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>>,
512        index: impl ::core::convert::Into<i32>,
513    ) -> crate::unity_engine::gameobject::GameObject {
514        unsafe {
515            ::unity::il2cpp_call!((::unity::module_base()+0x21a3c60usize)as*mut u8,crate::unity_engine::gameobject::GameObject;
516(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>)::core::convert::Into::into(args),(i32)::core::convert::Into::into(index))
517        }
518    }
519
520    #[doc = "`GetFuncName(crate::moon_sharp::interpreter::dynvalue::DynValue)` overload"]
521    pub fn get_func_name(func: impl ::core::convert::Into<crate::moon_sharp::interpreter::dynvalue::DynValue>) -> ::unity::Il2CppString {
522        unsafe {
523            ::unity::il2cpp_call!((::unity::module_base()+0x21a3f30usize)as*mut u8, ::unity::Il2CppString;
524(crate::moon_sharp::interpreter::dynvalue::DynValue)::core::convert::Into::into(func))
525        }
526    }
527
528    #[doc = "`GetScriptPath(::unity::Il2CppString)` overload"]
529    pub fn get_script_path(name: impl ::core::convert::Into<::unity::Il2CppString>) -> ::unity::Il2CppString {
530        unsafe {
531            ::unity::il2cpp_call!((::unity::module_base()+0x21a42a0usize)as*mut u8, ::unity::Il2CppString;
532(::unity::Il2CppString)::core::convert::Into::into(name))
533        }
534    }
535
536    #[doc = "`Yield()` overload"]
537    pub fn r#yield() -> () {
538        unsafe {
539            ::unity::il2cpp_call!((::unity::module_base()+0x21994e0usize)as*mut u8,();
540            )
541        }
542    }
543
544    #[doc = "`Call(crate::moon_sharp::interpreter::dynvalue::DynValue, ::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>)` overload"]
545    pub fn call(
546        func: impl ::core::convert::Into<crate::moon_sharp::interpreter::dynvalue::DynValue>,
547        args: impl ::core::convert::Into<::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>>,
548    ) -> () {
549        unsafe {
550            ::unity::il2cpp_call!((::unity::module_base()+0x21a4370usize)as*mut u8,();
551(crate::moon_sharp::interpreter::dynvalue::DynValue)::core::convert::Into::into(func),(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>)::core::convert::Into::into(args))
552        }
553    }
554
555    #[doc = "`AddCoroutine(crate::moon_sharp::interpreter::dynvalue::DynValue, ::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>)` overload"]
556    pub fn add_coroutine(
557        func: impl ::core::convert::Into<crate::moon_sharp::interpreter::dynvalue::DynValue>,
558        args: impl ::core::convert::Into<::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>>,
559    ) -> () {
560        unsafe {
561            ::unity::il2cpp_call!((::unity::module_base()+0x21a4430usize)as*mut u8,();
562(crate::moon_sharp::interpreter::dynvalue::DynValue)::core::convert::Into::into(func),(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>)::core::convert::Into::into(args))
563        }
564    }
565
566    #[doc = "`JumpCoroutine(crate::moon_sharp::interpreter::dynvalue::DynValue, ::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>)` overload"]
567    pub fn jump_coroutine(
568        func: impl ::core::convert::Into<crate::moon_sharp::interpreter::dynvalue::DynValue>,
569        args: impl ::core::convert::Into<::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>>,
570    ) -> () {
571        unsafe {
572            ::unity::il2cpp_call!((::unity::module_base()+0x21a4500usize)as*mut u8,();
573(crate::moon_sharp::interpreter::dynvalue::DynValue)::core::convert::Into::into(func),(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>)::core::convert::Into::into(args))
574        }
575    }
576
577    #[doc = "`GetSequence()` overload"]
578    pub fn get_sequence() -> crate::app::procinst::ProcInst {
579        unsafe {
580            ::unity::il2cpp_call!((::unity::module_base()+0x21a4860usize)as*mut u8,crate::app::procinst::ProcInst;
581            )
582        }
583    }
584
585    #[doc = "`TryGetMenuCondition(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>, i32)` overload"]
586    pub fn try_get_menu_condition(
587        args: impl ::core::convert::Into<::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>>,
588        index: impl ::core::convert::Into<i32>,
589    ) -> crate::app::scriptutil::ScriptUtil_MenuCondtion {
590        unsafe {
591            ::unity::il2cpp_call!((::unity::module_base()+0x21a48e0usize)as*mut u8,crate::app::scriptutil::ScriptUtil_MenuCondtion;
592(::unity::Array<crate::moon_sharp::interpreter::dynvalue::DynValue>)::core::convert::Into::into(args),(i32)::core::convert::Into::into(index))
593        }
594    }
595
596    #[doc = "`GetCursorStackName(i32)` overload"]
597    pub fn get_cursor_stack_name(index: impl ::core::convert::Into<i32>) -> ::unity::Il2CppString {
598        unsafe {
599            ::unity::il2cpp_call!((::unity::module_base()+0x21a49c0usize)as*mut u8, ::unity::Il2CppString;
600(i32)::core::convert::Into::into(index))
601        }
602    }
603
604    #[doc = "`CreateCursorStack()` overload"]
605    pub fn create_cursor_stack() -> () {
606        unsafe {
607            ::unity::il2cpp_call!((::unity::module_base()+0x21a4a80usize)as*mut u8,();
608            )
609        }
610    }
611
612    #[doc = "`ClearCursorStack()` overload"]
613    pub fn clear_cursor_stack() -> () {
614        unsafe {
615            ::unity::il2cpp_call!((::unity::module_base()+0x21a45f0usize)as*mut u8,();
616            )
617        }
618    }
619
620    #[doc = "`ClearCursorStack(i32)` overload"]
621    pub fn clear_cursor_stack_2(index: impl ::core::convert::Into<i32>) -> () {
622        unsafe {
623            ::unity::il2cpp_call!((::unity::module_base()+0x21a4bc0usize)as*mut u8,();
624(i32)::core::convert::Into::into(index))
625        }
626    }
627
628    #[doc = "`GetCursorStack(i32)` overload"]
629    pub fn get_cursor_stack(index: impl ::core::convert::Into<i32>) -> i32 {
630        unsafe {
631            ::unity::il2cpp_call!((::unity::module_base()+0x21a4e30usize)as*mut u8,i32;
632(i32)::core::convert::Into::into(index))
633        }
634    }
635
636    #[doc = "`SetCursorStack(i32, i32)` overload"]
637    pub fn set_cursor_stack(index: impl ::core::convert::Into<i32>, value: impl ::core::convert::Into<i32>) -> () {
638        unsafe {
639            ::unity::il2cpp_call!((::unity::module_base()+0x21a5010usize)as*mut u8,();
640(i32)::core::convert::Into::into(index),(i32)::core::convert::Into::into(value))
641        }
642    }
643
644    #[doc = "`.cctor()` overload"]
645    pub fn cctor() -> () {
646        unsafe {
647            ::unity::il2cpp_call!((::unity::module_base()+0x21a52b0usize)as*mut u8,();
648            )
649        }
650    }
651}
652
653#[cfg(feature = "app-scriptutil")]
654pub trait IScriptUtilMethods: IScriptUtil {
655    #[doc = "`.ctor()` overload"]
656    fn ctor(self) -> () {
657        unsafe {
658            let __receiver = <ScriptUtil as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
659            ::unity::il2cpp_call!((::unity::module_base()+0x21a3050usize)as*mut u8,();
660(ScriptUtil)__receiver)
661        }
662    }
663}
664
665#[cfg(feature = "app-scriptutil")]
666impl<__T: IScriptUtil> IScriptUtilMethods for __T {}
667
668#[cfg(feature = "app-scriptutil")]
669impl ScriptUtil {
670    pub fn get_int_method_info() -> &'static ::unity::il2cpp::MethodInfo {
671        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
672    }
673
674    pub fn get_float_method_info() -> &'static ::unity::il2cpp::MethodInfo {
675        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
676    }
677
678    pub fn get_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
679        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
680    }
681
682    pub fn get_bool_method_info() -> &'static ::unity::il2cpp::MethodInfo {
683        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
684    }
685
686    pub fn is_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
687        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
688    }
689
690    pub fn try_get_type_method_info() -> &'static ::unity::il2cpp::MethodInfo {
691        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
692    }
693
694    pub fn try_get_int_method_info() -> &'static ::unity::il2cpp::MethodInfo {
695        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
696    }
697
698    pub fn try_get_float_method_info() -> &'static ::unity::il2cpp::MethodInfo {
699        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
700    }
701
702    pub fn try_get_hash_method_info() -> &'static ::unity::il2cpp::MethodInfo {
703        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
704    }
705
706    pub fn try_get_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
707        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
708    }
709
710    pub fn try_get_bool_method_info() -> &'static ::unity::il2cpp::MethodInfo {
711        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
712    }
713
714    pub fn try_get_force_method_info() -> &'static ::unity::il2cpp::MethodInfo {
715        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
716    }
717
718    pub fn try_get_unit_method_info() -> &'static ::unity::il2cpp::MethodInfo {
719        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
720    }
721
722    pub fn try_map_get_unit_method_info() -> &'static ::unity::il2cpp::MethodInfo {
723        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
724    }
725
726    pub fn try_get_god_unit_method_info() -> &'static ::unity::il2cpp::MethodInfo {
727        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
728    }
729
730    pub fn try_get_item_method_info() -> &'static ::unity::il2cpp::MethodInfo {
731        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
732    }
733
734    pub fn try_get_func_method_info() -> &'static ::unity::il2cpp::MethodInfo {
735        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[17]
736    }
737
738    pub fn try_get_value_method_info() -> &'static ::unity::il2cpp::MethodInfo {
739        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[18]
740    }
741
742    pub fn try_get_args_method_info() -> &'static ::unity::il2cpp::MethodInfo {
743        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[19]
744    }
745
746    pub fn try_get_game_object_method_info() -> &'static ::unity::il2cpp::MethodInfo {
747        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[22]
748    }
749
750    pub fn try_get_locator_method_info() -> &'static ::unity::il2cpp::MethodInfo {
751        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[25]
752    }
753
754    pub fn get_func_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
755        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[26]
756    }
757
758    pub fn get_script_path_method_info() -> &'static ::unity::il2cpp::MethodInfo {
759        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[27]
760    }
761
762    pub fn yield_method_info() -> &'static ::unity::il2cpp::MethodInfo {
763        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[28]
764    }
765
766    pub fn call_method_info() -> &'static ::unity::il2cpp::MethodInfo {
767        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[29]
768    }
769
770    pub fn add_coroutine_method_info() -> &'static ::unity::il2cpp::MethodInfo {
771        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[30]
772    }
773
774    pub fn jump_coroutine_method_info() -> &'static ::unity::il2cpp::MethodInfo {
775        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[31]
776    }
777
778    pub fn get_sequence_method_info() -> &'static ::unity::il2cpp::MethodInfo {
779        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[32]
780    }
781
782    pub fn try_get_menu_condition_method_info() -> &'static ::unity::il2cpp::MethodInfo {
783        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[33]
784    }
785
786    pub fn get_cursor_stack_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
787        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[34]
788    }
789
790    pub fn create_cursor_stack_method_info() -> &'static ::unity::il2cpp::MethodInfo {
791        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[35]
792    }
793
794    pub fn clear_cursor_stack_method_info() -> &'static ::unity::il2cpp::MethodInfo {
795        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[36]
796    }
797
798    pub fn clear_cursor_stack_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
799        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[37]
800    }
801
802    pub fn get_cursor_stack_method_info() -> &'static ::unity::il2cpp::MethodInfo {
803        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[38]
804    }
805
806    pub fn set_cursor_stack_method_info() -> &'static ::unity::il2cpp::MethodInfo {
807        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[39]
808    }
809
810    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
811        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[40]
812    }
813
814    pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
815        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[41]
816    }
817}
818
819#[cfg(feature = "app-scriptutil")]
820impl ScriptUtil {
821    #[doc = "`.ctor()` — no args"]
822    pub fn new() -> Self {
823        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
824            panic!(
825                "{}
826::{}
827 failed to instantiate",
828                ::core::stringify!(ScriptUtil),
829                ::core::stringify!(new),
830            )
831        });
832        <Self as IScriptUtilMethods>::ctor(this);
833        this
834    }
835}
836
837#[cfg(feature = "app-scriptutil")]
838#[doc(hidden)]
839pub mod prelude {
840    pub use super::{IScriptUtil, IScriptUtilMethods, ScriptUtil, ScriptUtil_MenuCondtion};
841    #[cfg(feature = "system-object")]
842    pub use crate::system::object::IObjectMethods;
843    #[cfg(feature = "system-enum")]
844    pub use crate::system::r#enum::IEnumMethods;
845    #[cfg(feature = "system-valuetype")]
846    pub use crate::system::valuetype::IValueTypeMethods;
847    pub use crate::system::{object::IObject, r#enum::IEnum, valuetype::IValueType};
848}