1#[cfg(feature = "app-objectenumerator-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::{
9 collections::generic::list_1::{IList_1, List_1},
10 object::{IObject, Object},
11 };
12
13 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/objectenumerator/ObjectEnumerator.md"))]
14 #[::unity::class(namespace = "App", name = "ObjectEnumerator")]
15 #[parent(crate::system::collections::generic::list_1::List_1<crate::unity_engine::gameobject::GameObject>)]
16 pub struct ObjectEnumerator {}
17}
18
19#[cfg(feature = "app-objectenumerator-types")]
20pub use __types::*;
21
22#[cfg(feature = "app-objectenumerator")]
23impl ObjectEnumerator {
24 #[doc = "`FindByName(::unity::Il2CppString, crate::unity_engine::gameobject::GameObject)` overload"]
25 pub fn find_by_name(
26 name: impl ::core::convert::Into<::unity::Il2CppString>,
27 game_object: impl ::core::convert::Into<crate::unity_engine::gameobject::GameObject>,
28 ) -> crate::app::objectenumerator::ObjectEnumerator {
29 unsafe {
30 ::unity::il2cpp_call!((::unity::module_base()+0x1f20640usize)as*mut u8,crate::app::objectenumerator::ObjectEnumerator;
31(::unity::Il2CppString)::core::convert::Into::into(name),(crate::unity_engine::gameobject::GameObject)::core::convert::Into::into(game_object))
32 }
33 }
34
35 #[doc = "`FindByLayer(i32, crate::unity_engine::gameobject::GameObject)` overload"]
36 pub fn find_by_layer(
37 layer: impl ::core::convert::Into<i32>,
38 root: impl ::core::convert::Into<crate::unity_engine::gameobject::GameObject>,
39 ) -> crate::app::objectenumerator::ObjectEnumerator {
40 unsafe {
41 ::unity::il2cpp_call!((::unity::module_base()+0x1f20a50usize)as*mut u8,crate::app::objectenumerator::ObjectEnumerator;
42(i32)::core::convert::Into::into(layer),(crate::unity_engine::gameobject::GameObject)::core::convert::Into::into(root))
43 }
44 }
45
46 #[doc = "`FindByLayer(::unity::Il2CppString, crate::unity_engine::gameobject::GameObject)` overload"]
47 pub fn find_by_layer_2(
48 layer: impl ::core::convert::Into<::unity::Il2CppString>,
49 root: impl ::core::convert::Into<crate::unity_engine::gameobject::GameObject>,
50 ) -> crate::app::objectenumerator::ObjectEnumerator {
51 unsafe {
52 ::unity::il2cpp_call!((::unity::module_base()+0x1f20de0usize)as*mut u8,crate::app::objectenumerator::ObjectEnumerator;
53(::unity::Il2CppString)::core::convert::Into::into(layer),(crate::unity_engine::gameobject::GameObject)::core::convert::Into::into(root))
54 }
55 }
56
57 #[doc = "`FindParent(crate::unity_engine::gameobject::GameObject)` overload"]
58 pub fn find_parent(
59 game_object: impl ::core::convert::Into<crate::unity_engine::gameobject::GameObject>,
60 ) -> crate::app::objectenumerator::ObjectEnumerator {
61 unsafe {
62 ::unity::il2cpp_call!((::unity::module_base()+0x1f20e00usize)as*mut u8,crate::app::objectenumerator::ObjectEnumerator;
63(crate::unity_engine::gameobject::GameObject)::core::convert::Into::into(game_object))
64 }
65 }
66
67 #[doc = "`FindChild(crate::unity_engine::gameobject::GameObject)` overload"]
68 pub fn find_child(
69 game_object: impl ::core::convert::Into<crate::unity_engine::gameobject::GameObject>,
70 ) -> crate::app::objectenumerator::ObjectEnumerator {
71 unsafe {
72 ::unity::il2cpp_call!((::unity::module_base()+0x1f20ff0usize)as*mut u8,crate::app::objectenumerator::ObjectEnumerator;
73(crate::unity_engine::gameobject::GameObject)::core::convert::Into::into(game_object))
74 }
75 }
76}
77
78#[cfg(feature = "app-objectenumerator")]
79pub trait IObjectEnumeratorMethods: IObjectEnumerator {
80 #[doc = "`FindByNameImpl(::unity::Il2CppString, crate::unity_engine::scene_management::scene::Scene)` overload"]
81 fn find_by_name_impl(
82 self,
83 name: impl ::core::convert::Into<::unity::Il2CppString>,
84 scene: impl ::core::convert::Into<crate::unity_engine::scene_management::scene::Scene>,
85 ) -> () {
86 unsafe {
87 let __receiver = <ObjectEnumerator as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
88 ::unity::il2cpp_call!((::unity::module_base()+0x1f209b0usize)as*mut u8,();
89(ObjectEnumerator)__receiver,(::unity::Il2CppString)::core::convert::Into::into(name),(crate::unity_engine::scene_management::scene::Scene)::core::convert::Into::into(scene))
90 }
91 }
92 #[doc = "`FindByNameImpl(::unity::Il2CppString, crate::unity_engine::gameobject::GameObject)` overload"]
93 fn find_by_name_impl_2(
94 self,
95 name: impl ::core::convert::Into<::unity::Il2CppString>,
96 game_object: impl ::core::convert::Into<crate::unity_engine::gameobject::GameObject>,
97 ) -> () {
98 unsafe {
99 let __receiver = <ObjectEnumerator as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
100 ::unity::il2cpp_call!((::unity::module_base()+0x1f208c0usize)as*mut u8,();
101(ObjectEnumerator)__receiver,(::unity::Il2CppString)::core::convert::Into::into(name),(crate::unity_engine::gameobject::GameObject)::core::convert::Into::into(game_object))
102 }
103 }
104 #[doc = "`FindByLayerImpl(i32, crate::unity_engine::scene_management::scene::Scene)` overload"]
105 fn find_by_layer_impl(
106 self,
107 layer: impl ::core::convert::Into<i32>,
108 scene: impl ::core::convert::Into<crate::unity_engine::scene_management::scene::Scene>,
109 ) -> () {
110 unsafe {
111 let __receiver = <ObjectEnumerator as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
112 ::unity::il2cpp_call!((::unity::module_base()+0x1f20d40usize)as*mut u8,();
113(ObjectEnumerator)__receiver,(i32)::core::convert::Into::into(layer),(crate::unity_engine::scene_management::scene::Scene)::core::convert::Into::into(scene))
114 }
115 }
116 #[doc = "`FindByLayerImpl(i32, crate::unity_engine::gameobject::GameObject)` overload"]
117 fn find_by_layer_impl_2(
118 self,
119 layer: impl ::core::convert::Into<i32>,
120 game_object: impl ::core::convert::Into<crate::unity_engine::gameobject::GameObject>,
121 ) -> () {
122 unsafe {
123 let __receiver = <ObjectEnumerator as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
124 ::unity::il2cpp_call!((::unity::module_base()+0x1f20c50usize)as*mut u8,();
125(ObjectEnumerator)__receiver,(i32)::core::convert::Into::into(layer),(crate::unity_engine::gameobject::GameObject)::core::convert::Into::into(game_object))
126 }
127 }
128 #[doc = "`FindParentImpl(crate::unity_engine::transform::Transform)` overload"]
129 fn find_parent_impl(self, transform: impl ::core::convert::Into<crate::unity_engine::transform::Transform>) -> () {
130 unsafe {
131 let __receiver = <ObjectEnumerator as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
132 ::unity::il2cpp_call!((::unity::module_base()+0x1f20f20usize)as*mut u8,();
133(ObjectEnumerator)__receiver,(crate::unity_engine::transform::Transform)::core::convert::Into::into(transform))
134 }
135 }
136 #[doc = "`FindChildImpl(crate::unity_engine::transform::Transform)` overload"]
137 fn find_child_impl(self, transform: impl ::core::convert::Into<crate::unity_engine::transform::Transform>) -> () {
138 unsafe {
139 let __receiver = <ObjectEnumerator as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
140 ::unity::il2cpp_call!((::unity::module_base()+0x1f21110usize)as*mut u8,();
141(ObjectEnumerator)__receiver,(crate::unity_engine::transform::Transform)::core::convert::Into::into(transform))
142 }
143 }
144 #[doc = "`SetActive(bool)` overload"]
145 fn set_active(self, enabled: impl ::core::convert::Into<bool>) -> crate::app::objectenumerator::ObjectEnumerator {
146 unsafe {
147 let __receiver = <ObjectEnumerator as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
148 ::unity::il2cpp_call!((::unity::module_base()+0x1f21210usize)as*mut u8,crate::app::objectenumerator::ObjectEnumerator;
149(ObjectEnumerator)__receiver,(bool)::core::convert::Into::into(enabled))
150 }
151 }
152 fn set_enable<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
153 self,
154 enabled: impl ::core::convert::Into<bool>,
155 ) -> crate::app::objectenumerator::ObjectEnumerator {
156 static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
157 ::unity::lookup::method_info_on_class(<ObjectEnumerator as ::unity::ClassIdentity>::class(), "SetEnable", 1)
158 });
159 #[allow(clippy::type_complexity)]
160 static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
161 ::std::sync::OnceLock::new();
162 let _ = false;
163 let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
164 ::core::result::Result::Ok(mi) => *mi,
165 ::core::result::Result::Err(e) => {
166 panic!(
167 "method lookup failed: {}
168::{}
169: {}
170",
171 <ObjectEnumerator as ::unity::ClassIdentity>::NAME,
172 "SetEnable",
173 e
174 )
175 },
176 };
177 let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
178 let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
179 let __inflated: &'static ::unity::il2cpp::MethodInfo = {
180 let mut __guard = __cache.lock().unwrap();
181 *__guard
182 .entry(__key)
183 .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
184 };
185 unsafe {
186 let __receiver = <ObjectEnumerator as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
187 let __f: extern "C" fn(ObjectEnumerator, bool, ::unity::OptionalMethod) -> crate::app::objectenumerator::ObjectEnumerator =
188 ::core::mem::transmute(__inflated.method_ptr);
189 let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
190 __f(
191 __receiver,
192 ::core::convert::Into::into(enabled),
193 ::core::option::Option::Some(__mi_opaque),
194 )
195 }
196 }
197 fn is_component<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(self) -> bool {
198 static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
199 ::unity::lookup::method_info_on_class(<ObjectEnumerator as ::unity::ClassIdentity>::class(), "IsComponent", 0)
200 });
201 #[allow(clippy::type_complexity)]
202 static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
203 ::std::sync::OnceLock::new();
204 let _ = false;
205 let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
206 ::core::result::Result::Ok(mi) => *mi,
207 ::core::result::Result::Err(e) => {
208 panic!(
209 "method lookup failed: {}
210::{}
211: {}
212",
213 <ObjectEnumerator as ::unity::ClassIdentity>::NAME,
214 "IsComponent",
215 e
216 )
217 },
218 };
219 let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
220 let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
221 let __inflated: &'static ::unity::il2cpp::MethodInfo = {
222 let mut __guard = __cache.lock().unwrap();
223 *__guard
224 .entry(__key)
225 .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
226 };
227 unsafe {
228 let __receiver = <ObjectEnumerator as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
229 let __f: extern "C" fn(ObjectEnumerator, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__inflated.method_ptr);
230 let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
231 __f(__receiver, ::core::option::Option::Some(__mi_opaque))
232 }
233 }
234 #[doc = "`Dump()` overload"]
235 fn dump(self) -> crate::app::objectenumerator::ObjectEnumerator {
236 unsafe {
237 let __receiver = <ObjectEnumerator as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
238 ::unity::il2cpp_call!((::unity::module_base()+0x1f21360usize)as*mut u8,crate::app::objectenumerator::ObjectEnumerator;
239(ObjectEnumerator)__receiver)
240 }
241 }
242 #[doc = "`.ctor()` overload"]
243 fn ctor(self) -> () {
244 unsafe {
245 let __receiver = <ObjectEnumerator as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
246 ::unity::il2cpp_call!((::unity::module_base()+0x1f20840usize)as*mut u8,();
247(ObjectEnumerator)__receiver)
248 }
249 }
250}
251
252#[cfg(feature = "app-objectenumerator")]
253impl<__T: IObjectEnumerator> IObjectEnumeratorMethods for __T {}
254
255#[cfg(feature = "app-objectenumerator")]
256impl ObjectEnumerator {
257 pub fn find_by_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
258 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
259 }
260
261 pub fn find_by_name_impl_method_info() -> &'static ::unity::il2cpp::MethodInfo {
262 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
263 }
264
265 pub fn find_by_name_impl_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
266 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
267 }
268
269 pub fn find_by_layer_method_info() -> &'static ::unity::il2cpp::MethodInfo {
270 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
271 }
272
273 pub fn find_by_layer_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
274 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
275 }
276
277 pub fn find_by_layer_impl_method_info() -> &'static ::unity::il2cpp::MethodInfo {
278 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
279 }
280
281 pub fn find_by_layer_impl_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
282 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
283 }
284
285 pub fn find_parent_method_info() -> &'static ::unity::il2cpp::MethodInfo {
286 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
287 }
288
289 pub fn find_parent_impl_method_info() -> &'static ::unity::il2cpp::MethodInfo {
290 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
291 }
292
293 pub fn find_child_method_info() -> &'static ::unity::il2cpp::MethodInfo {
294 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
295 }
296
297 pub fn find_child_impl_method_info() -> &'static ::unity::il2cpp::MethodInfo {
298 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
299 }
300
301 pub fn set_active_method_info() -> &'static ::unity::il2cpp::MethodInfo {
302 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
303 }
304
305 pub fn dump_method_info() -> &'static ::unity::il2cpp::MethodInfo {
306 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
307 }
308
309 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
310 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
311 }
312}
313
314#[cfg(feature = "app-objectenumerator")]
315impl ObjectEnumerator {
316 #[doc = "`.ctor()` — no args"]
317 pub fn new() -> Self {
318 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
319 panic!(
320 "{}
321::{}
322 failed to instantiate",
323 ::core::stringify!(ObjectEnumerator),
324 ::core::stringify!(new),
325 )
326 });
327 <Self as IObjectEnumeratorMethods>::ctor(this);
328 this
329 }
330}
331
332#[cfg(feature = "app-objectenumerator")]
333#[doc(hidden)]
334pub mod prelude {
335 pub use super::{IObjectEnumerator, IObjectEnumeratorMethods, ObjectEnumerator};
336 #[cfg(feature = "system-collections-generic-list_1")]
337 pub use crate::system::collections::generic::list_1::IList_1Methods;
338 #[cfg(feature = "system-object")]
339 pub use crate::system::object::IObjectMethods;
340 pub use crate::system::{collections::generic::list_1::IList_1, object::IObject};
341}