Skip to main content

engage/generated/unity_engine/
component.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-component-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::{
9        system::object::{IObject, Object},
10        unity_engine::object_2::{IObject_2, Object_2},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/component/Component.md"))]
14    #[::unity::class(namespace = "UnityEngine", name = "Component")]
15    #[parent(crate::unity_engine::object_2::Object_2)]
16    pub struct Component {}
17}
18
19#[cfg(feature = "unity_engine-component-types")]
20pub use __types::*;
21
22#[cfg(feature = "unity_engine-component")]
23pub trait IComponentMethods: IComponent {
24    #[doc = "`get_transform()` overload"]
25    fn get_transform(self) -> crate::unity_engine::transform::Transform {
26        unsafe {
27            let __receiver = <Component as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
28            ::unity::il2cpp_call!((::unity::module_base()+0x2c46440usize)as*mut u8,crate::unity_engine::transform::Transform;
29(Component)__receiver)
30        }
31    }
32    #[doc = "`get_gameObject()` overload"]
33    fn get_game_object(self) -> crate::unity_engine::gameobject::GameObject {
34        unsafe {
35            let __receiver = <Component as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
36            ::unity::il2cpp_call!((::unity::module_base()+0x2c46490usize)as*mut u8,crate::unity_engine::gameobject::GameObject;
37(Component)__receiver)
38        }
39    }
40    #[doc = "`GetComponent(::unity::SystemType)` overload"]
41    fn get_component(self, r#type: impl ::core::convert::Into<::unity::SystemType>) -> crate::unity_engine::component::Component {
42        unsafe {
43            let __receiver = <Component as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
44            ::unity::il2cpp_call!((::unity::module_base()+0x2c464e0usize)as*mut u8,crate::unity_engine::component::Component;
45(Component)__receiver,(::unity::SystemType)::core::convert::Into::into(r#type))
46        }
47    }
48    #[doc = "`GetComponentFastPath(::unity::SystemType, ::unity::IntPtr)` overload"]
49    fn get_component_fast_path(
50        self,
51        r#type: impl ::core::convert::Into<::unity::SystemType>,
52        one_further_than_result_value: impl ::core::convert::Into<::unity::IntPtr>,
53    ) -> () {
54        unsafe {
55            let __receiver = <Component as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
56            ::unity::il2cpp_call!((::unity::module_base()+0x2c465b0usize)as*mut u8,();
57(Component)__receiver,(::unity::SystemType)::core::convert::Into::into(r#type),(::unity::IntPtr)::core::convert::Into::into(one_further_than_result_value))
58        }
59    }
60    fn get_component_2<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(self) -> M0 {
61        static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> =
62            ::std::sync::LazyLock::new(|| ::unity::lookup::method_info_on_class(<Component as ::unity::ClassIdentity>::class(), "GetComponent", 0));
63        #[allow(clippy::type_complexity)]
64        static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
65            ::std::sync::OnceLock::new();
66        let _ = false;
67        let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
68            ::core::result::Result::Ok(mi) => *mi,
69            ::core::result::Result::Err(e) => {
70                panic!(
71                    "method lookup failed: {}
72::{}
73: {}
74",
75                    <Component as ::unity::ClassIdentity>::NAME,
76                    "GetComponent",
77                    e
78                )
79            },
80        };
81        let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
82        let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
83        let __inflated: &'static ::unity::il2cpp::MethodInfo = {
84            let mut __guard = __cache.lock().unwrap();
85            *__guard
86                .entry(__key)
87                .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
88        };
89        unsafe {
90            let __receiver = <Component as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
91            let __f: extern "C" fn(Component, ::unity::OptionalMethod) -> M0 = ::core::mem::transmute(__inflated.method_ptr);
92            let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
93            __f(__receiver, ::core::option::Option::Some(__mi_opaque))
94        }
95    }
96    fn try_get_component<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
97        self,
98        component: impl ::core::convert::Into<*mut M0>,
99    ) -> bool {
100        static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
101            ::unity::lookup::method_info_on_class(<Component as ::unity::ClassIdentity>::class(), "TryGetComponent", 1)
102        });
103        #[allow(clippy::type_complexity)]
104        static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
105            ::std::sync::OnceLock::new();
106        let _ = false;
107        let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
108            ::core::result::Result::Ok(mi) => *mi,
109            ::core::result::Result::Err(e) => {
110                panic!(
111                    "method lookup failed: {}
112::{}
113: {}
114",
115                    <Component as ::unity::ClassIdentity>::NAME,
116                    "TryGetComponent",
117                    e
118                )
119            },
120        };
121        let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
122        let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
123        let __inflated: &'static ::unity::il2cpp::MethodInfo = {
124            let mut __guard = __cache.lock().unwrap();
125            *__guard
126                .entry(__key)
127                .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
128        };
129        unsafe {
130            let __receiver = <Component as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
131            let __f: extern "C" fn(Component, *mut M0, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__inflated.method_ptr);
132            let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
133            __f(
134                __receiver,
135                ::core::convert::Into::into(component),
136                ::core::option::Option::Some(__mi_opaque),
137            )
138        }
139    }
140    #[doc = "`GetComponentInChildren(::unity::SystemType, bool)` overload"]
141    fn get_component_in_children(
142        self,
143        t: impl ::core::convert::Into<::unity::SystemType>,
144        include_inactive: impl ::core::convert::Into<bool>,
145    ) -> crate::unity_engine::component::Component {
146        unsafe {
147            let __receiver = <Component as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
148            ::unity::il2cpp_call!((::unity::module_base()+0x2c46610usize)as*mut u8,crate::unity_engine::component::Component;
149(Component)__receiver,(::unity::SystemType)::core::convert::Into::into(t),(bool)::core::convert::Into::into(include_inactive))
150        }
151    }
152    fn get_component_in_children_2<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
153        self,
154        include_inactive: impl ::core::convert::Into<bool>,
155    ) -> M0 {
156        static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
157            ::unity::lookup::method_info_on_class(<Component as ::unity::ClassIdentity>::class(), "GetComponentInChildren", 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                    <Component as ::unity::ClassIdentity>::NAME,
172                    "GetComponentInChildren",
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 = <Component as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
187            let __f: extern "C" fn(Component, bool, ::unity::OptionalMethod) -> M0 = ::core::mem::transmute(__inflated.method_ptr);
188            let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
189            __f(
190                __receiver,
191                ::core::convert::Into::into(include_inactive),
192                ::core::option::Option::Some(__mi_opaque),
193            )
194        }
195    }
196    fn get_component_in_children_3<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(self) -> M0 {
197        static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
198            ::unity::lookup::method_info_on_class(<Component as ::unity::ClassIdentity>::class(), "GetComponentInChildren", 0)
199        });
200        #[allow(clippy::type_complexity)]
201        static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
202            ::std::sync::OnceLock::new();
203        let _ = false;
204        let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
205            ::core::result::Result::Ok(mi) => *mi,
206            ::core::result::Result::Err(e) => {
207                panic!(
208                    "method lookup failed: {}
209::{}
210: {}
211",
212                    <Component as ::unity::ClassIdentity>::NAME,
213                    "GetComponentInChildren",
214                    e
215                )
216            },
217        };
218        let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
219        let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
220        let __inflated: &'static ::unity::il2cpp::MethodInfo = {
221            let mut __guard = __cache.lock().unwrap();
222            *__guard
223                .entry(__key)
224                .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
225        };
226        unsafe {
227            let __receiver = <Component as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
228            let __f: extern "C" fn(Component, ::unity::OptionalMethod) -> M0 = ::core::mem::transmute(__inflated.method_ptr);
229            let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
230            __f(__receiver, ::core::option::Option::Some(__mi_opaque))
231        }
232    }
233    fn get_components_in_children<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
234        self,
235        include_inactive: impl ::core::convert::Into<bool>,
236    ) -> ::unity::Array<M0> {
237        static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
238            ::unity::lookup::method_info_on_class(<Component as ::unity::ClassIdentity>::class(), "GetComponentsInChildren", 1)
239        });
240        #[allow(clippy::type_complexity)]
241        static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
242            ::std::sync::OnceLock::new();
243        let _ = false;
244        let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
245            ::core::result::Result::Ok(mi) => *mi,
246            ::core::result::Result::Err(e) => {
247                panic!(
248                    "method lookup failed: {}
249::{}
250: {}
251",
252                    <Component as ::unity::ClassIdentity>::NAME,
253                    "GetComponentsInChildren",
254                    e
255                )
256            },
257        };
258        let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
259        let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
260        let __inflated: &'static ::unity::il2cpp::MethodInfo = {
261            let mut __guard = __cache.lock().unwrap();
262            *__guard
263                .entry(__key)
264                .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
265        };
266        unsafe {
267            let __receiver = <Component as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
268            let __f: extern "C" fn(Component, bool, ::unity::OptionalMethod) -> ::unity::Array<M0> = ::core::mem::transmute(__inflated.method_ptr);
269            let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
270            __f(
271                __receiver,
272                ::core::convert::Into::into(include_inactive),
273                ::core::option::Option::Some(__mi_opaque),
274            )
275        }
276    }
277    fn get_components_in_children_2<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
278        self,
279        include_inactive: impl ::core::convert::Into<bool>,
280        result: impl ::core::convert::Into<crate::system::collections::generic::list_1::List_1<M0>>,
281    ) -> () {
282        static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
283            ::unity::lookup::method_info_on_class(<Component as ::unity::ClassIdentity>::class(), "GetComponentsInChildren", 2)
284        });
285        #[allow(clippy::type_complexity)]
286        static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
287            ::std::sync::OnceLock::new();
288        let _ = false;
289        let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
290            ::core::result::Result::Ok(mi) => *mi,
291            ::core::result::Result::Err(e) => {
292                panic!(
293                    "method lookup failed: {}
294::{}
295: {}
296",
297                    <Component as ::unity::ClassIdentity>::NAME,
298                    "GetComponentsInChildren",
299                    e
300                )
301            },
302        };
303        let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
304        let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
305        let __inflated: &'static ::unity::il2cpp::MethodInfo = {
306            let mut __guard = __cache.lock().unwrap();
307            *__guard
308                .entry(__key)
309                .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
310        };
311        unsafe {
312            let __receiver = <Component as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
313            let __f: extern "C" fn(Component, bool, crate::system::collections::generic::list_1::List_1<M0>, ::unity::OptionalMethod) -> () =
314                ::core::mem::transmute(__inflated.method_ptr);
315            let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
316            __f(
317                __receiver,
318                ::core::convert::Into::into(include_inactive),
319                ::core::convert::Into::into(result),
320                ::core::option::Option::Some(__mi_opaque),
321            )
322        }
323    }
324    fn get_components_in_children_3<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(self) -> ::unity::Array<M0> {
325        static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
326            ::unity::lookup::method_info_on_class(<Component as ::unity::ClassIdentity>::class(), "GetComponentsInChildren", 0)
327        });
328        #[allow(clippy::type_complexity)]
329        static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
330            ::std::sync::OnceLock::new();
331        let _ = false;
332        let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
333            ::core::result::Result::Ok(mi) => *mi,
334            ::core::result::Result::Err(e) => {
335                panic!(
336                    "method lookup failed: {}
337::{}
338: {}
339",
340                    <Component as ::unity::ClassIdentity>::NAME,
341                    "GetComponentsInChildren",
342                    e
343                )
344            },
345        };
346        let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
347        let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
348        let __inflated: &'static ::unity::il2cpp::MethodInfo = {
349            let mut __guard = __cache.lock().unwrap();
350            *__guard
351                .entry(__key)
352                .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
353        };
354        unsafe {
355            let __receiver = <Component as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
356            let __f: extern "C" fn(Component, ::unity::OptionalMethod) -> ::unity::Array<M0> = ::core::mem::transmute(__inflated.method_ptr);
357            let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
358            __f(__receiver, ::core::option::Option::Some(__mi_opaque))
359        }
360    }
361    fn get_components_in_children_4<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
362        self,
363        results: impl ::core::convert::Into<crate::system::collections::generic::list_1::List_1<M0>>,
364    ) -> () {
365        static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
366            ::unity::lookup::method_info_on_class(<Component as ::unity::ClassIdentity>::class(), "GetComponentsInChildren", 1)
367        });
368        #[allow(clippy::type_complexity)]
369        static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
370            ::std::sync::OnceLock::new();
371        let _ = false;
372        let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
373            ::core::result::Result::Ok(mi) => *mi,
374            ::core::result::Result::Err(e) => {
375                panic!(
376                    "method lookup failed: {}
377::{}
378: {}
379",
380                    <Component as ::unity::ClassIdentity>::NAME,
381                    "GetComponentsInChildren",
382                    e
383                )
384            },
385        };
386        let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
387        let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
388        let __inflated: &'static ::unity::il2cpp::MethodInfo = {
389            let mut __guard = __cache.lock().unwrap();
390            *__guard
391                .entry(__key)
392                .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
393        };
394        unsafe {
395            let __receiver = <Component as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
396            let __f: extern "C" fn(Component, crate::system::collections::generic::list_1::List_1<M0>, ::unity::OptionalMethod) -> () =
397                ::core::mem::transmute(__inflated.method_ptr);
398            let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
399            __f(
400                __receiver,
401                ::core::convert::Into::into(results),
402                ::core::option::Option::Some(__mi_opaque),
403            )
404        }
405    }
406    #[doc = "`GetComponentInParent(::unity::SystemType)` overload"]
407    fn get_component_in_parent(self, t: impl ::core::convert::Into<::unity::SystemType>) -> crate::unity_engine::component::Component {
408        unsafe {
409            let __receiver = <Component as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
410            ::unity::il2cpp_call!((::unity::module_base()+0x2c46700usize)as*mut u8,crate::unity_engine::component::Component;
411(Component)__receiver,(::unity::SystemType)::core::convert::Into::into(t))
412        }
413    }
414    fn get_component_in_parent_2<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(self) -> M0 {
415        static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
416            ::unity::lookup::method_info_on_class(<Component as ::unity::ClassIdentity>::class(), "GetComponentInParent", 0)
417        });
418        #[allow(clippy::type_complexity)]
419        static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
420            ::std::sync::OnceLock::new();
421        let _ = false;
422        let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
423            ::core::result::Result::Ok(mi) => *mi,
424            ::core::result::Result::Err(e) => {
425                panic!(
426                    "method lookup failed: {}
427::{}
428: {}
429",
430                    <Component as ::unity::ClassIdentity>::NAME,
431                    "GetComponentInParent",
432                    e
433                )
434            },
435        };
436        let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
437        let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
438        let __inflated: &'static ::unity::il2cpp::MethodInfo = {
439            let mut __guard = __cache.lock().unwrap();
440            *__guard
441                .entry(__key)
442                .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
443        };
444        unsafe {
445            let __receiver = <Component as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
446            let __f: extern "C" fn(Component, ::unity::OptionalMethod) -> M0 = ::core::mem::transmute(__inflated.method_ptr);
447            let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
448            __f(__receiver, ::core::option::Option::Some(__mi_opaque))
449        }
450    }
451    fn get_components_in_parent<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
452        self,
453        include_inactive: impl ::core::convert::Into<bool>,
454    ) -> ::unity::Array<M0> {
455        static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
456            ::unity::lookup::method_info_on_class(<Component as ::unity::ClassIdentity>::class(), "GetComponentsInParent", 1)
457        });
458        #[allow(clippy::type_complexity)]
459        static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
460            ::std::sync::OnceLock::new();
461        let _ = false;
462        let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
463            ::core::result::Result::Ok(mi) => *mi,
464            ::core::result::Result::Err(e) => {
465                panic!(
466                    "method lookup failed: {}
467::{}
468: {}
469",
470                    <Component as ::unity::ClassIdentity>::NAME,
471                    "GetComponentsInParent",
472                    e
473                )
474            },
475        };
476        let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
477        let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
478        let __inflated: &'static ::unity::il2cpp::MethodInfo = {
479            let mut __guard = __cache.lock().unwrap();
480            *__guard
481                .entry(__key)
482                .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
483        };
484        unsafe {
485            let __receiver = <Component as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
486            let __f: extern "C" fn(Component, bool, ::unity::OptionalMethod) -> ::unity::Array<M0> = ::core::mem::transmute(__inflated.method_ptr);
487            let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
488            __f(
489                __receiver,
490                ::core::convert::Into::into(include_inactive),
491                ::core::option::Option::Some(__mi_opaque),
492            )
493        }
494    }
495    fn get_components_in_parent_2<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
496        self,
497        include_inactive: impl ::core::convert::Into<bool>,
498        results: impl ::core::convert::Into<crate::system::collections::generic::list_1::List_1<M0>>,
499    ) -> () {
500        static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
501            ::unity::lookup::method_info_on_class(<Component as ::unity::ClassIdentity>::class(), "GetComponentsInParent", 2)
502        });
503        #[allow(clippy::type_complexity)]
504        static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
505            ::std::sync::OnceLock::new();
506        let _ = false;
507        let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
508            ::core::result::Result::Ok(mi) => *mi,
509            ::core::result::Result::Err(e) => {
510                panic!(
511                    "method lookup failed: {}
512::{}
513: {}
514",
515                    <Component as ::unity::ClassIdentity>::NAME,
516                    "GetComponentsInParent",
517                    e
518                )
519            },
520        };
521        let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
522        let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
523        let __inflated: &'static ::unity::il2cpp::MethodInfo = {
524            let mut __guard = __cache.lock().unwrap();
525            *__guard
526                .entry(__key)
527                .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
528        };
529        unsafe {
530            let __receiver = <Component as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
531            let __f: extern "C" fn(Component, bool, crate::system::collections::generic::list_1::List_1<M0>, ::unity::OptionalMethod) -> () =
532                ::core::mem::transmute(__inflated.method_ptr);
533            let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
534            __f(
535                __receiver,
536                ::core::convert::Into::into(include_inactive),
537                ::core::convert::Into::into(results),
538                ::core::option::Option::Some(__mi_opaque),
539            )
540        }
541    }
542    fn get_components_in_parent_3<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(self) -> ::unity::Array<M0> {
543        static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
544            ::unity::lookup::method_info_on_class(<Component as ::unity::ClassIdentity>::class(), "GetComponentsInParent", 0)
545        });
546        #[allow(clippy::type_complexity)]
547        static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
548            ::std::sync::OnceLock::new();
549        let _ = false;
550        let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
551            ::core::result::Result::Ok(mi) => *mi,
552            ::core::result::Result::Err(e) => {
553                panic!(
554                    "method lookup failed: {}
555::{}
556: {}
557",
558                    <Component as ::unity::ClassIdentity>::NAME,
559                    "GetComponentsInParent",
560                    e
561                )
562            },
563        };
564        let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
565        let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
566        let __inflated: &'static ::unity::il2cpp::MethodInfo = {
567            let mut __guard = __cache.lock().unwrap();
568            *__guard
569                .entry(__key)
570                .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
571        };
572        unsafe {
573            let __receiver = <Component as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
574            let __f: extern "C" fn(Component, ::unity::OptionalMethod) -> ::unity::Array<M0> = ::core::mem::transmute(__inflated.method_ptr);
575            let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
576            __f(__receiver, ::core::option::Option::Some(__mi_opaque))
577        }
578    }
579    #[doc = "`GetComponentsForListInternal(::unity::SystemType, crate::system::object::Object)` overload"]
580    fn get_components_for_list_internal(
581        self,
582        search_type: impl ::core::convert::Into<::unity::SystemType>,
583        result_list: impl ::core::convert::Into<crate::system::object::Object>,
584    ) -> () {
585        unsafe {
586            let __receiver = <Component as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
587            ::unity::il2cpp_call!((::unity::module_base()+0x2c467e0usize)as*mut u8,();
588(Component)__receiver,(::unity::SystemType)::core::convert::Into::into(search_type),(crate::system::object::Object)::core::convert::Into::into(result_list))
589        }
590    }
591    #[doc = "`GetComponents(::unity::SystemType, crate::system::collections::generic::list_1::List_1<crate::unity_engine::component::Component>)` overload"]
592    fn get_components(
593        self,
594        r#type: impl ::core::convert::Into<::unity::SystemType>,
595        results: impl ::core::convert::Into<crate::system::collections::generic::list_1::List_1<crate::unity_engine::component::Component>>,
596    ) -> () {
597        unsafe {
598            let __receiver = <Component as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
599            ::unity::il2cpp_call!((::unity::module_base()+0x2c46840usize)as*mut u8,();
600(Component)__receiver,(::unity::SystemType)::core::convert::Into::into(r#type),(crate::system::collections::generic::list_1::List_1<crate::unity_engine::component::Component>)::core::convert::Into::into(results))
601        }
602    }
603    fn get_components_2<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
604        self,
605        results: impl ::core::convert::Into<crate::system::collections::generic::list_1::List_1<M0>>,
606    ) -> () {
607        static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> =
608            ::std::sync::LazyLock::new(|| ::unity::lookup::method_info_on_class(<Component as ::unity::ClassIdentity>::class(), "GetComponents", 1));
609        #[allow(clippy::type_complexity)]
610        static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
611            ::std::sync::OnceLock::new();
612        let _ = false;
613        let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
614            ::core::result::Result::Ok(mi) => *mi,
615            ::core::result::Result::Err(e) => {
616                panic!(
617                    "method lookup failed: {}
618::{}
619: {}
620",
621                    <Component as ::unity::ClassIdentity>::NAME,
622                    "GetComponents",
623                    e
624                )
625            },
626        };
627        let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
628        let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
629        let __inflated: &'static ::unity::il2cpp::MethodInfo = {
630            let mut __guard = __cache.lock().unwrap();
631            *__guard
632                .entry(__key)
633                .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
634        };
635        unsafe {
636            let __receiver = <Component as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
637            let __f: extern "C" fn(Component, crate::system::collections::generic::list_1::List_1<M0>, ::unity::OptionalMethod) -> () =
638                ::core::mem::transmute(__inflated.method_ptr);
639            let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
640            __f(
641                __receiver,
642                ::core::convert::Into::into(results),
643                ::core::option::Option::Some(__mi_opaque),
644            )
645        }
646    }
647    #[doc = "`get_tag()` overload"]
648    fn get_tag(self) -> ::unity::Il2CppString {
649        unsafe {
650            let __receiver = <Component as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
651            ::unity::il2cpp_call!((::unity::module_base()+0x2c468a0usize)as*mut u8, ::unity::Il2CppString;
652(Component)__receiver)
653        }
654    }
655    #[doc = "`set_tag(::unity::Il2CppString)` overload"]
656    fn set_tag(self, value: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
657        unsafe {
658            let __receiver = <Component as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
659            ::unity::il2cpp_call!((::unity::module_base()+0x2c46970usize)as*mut u8,();
660(Component)__receiver,(::unity::Il2CppString)::core::convert::Into::into(value))
661        }
662    }
663    fn get_components_3<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(self) -> ::unity::Array<M0> {
664        static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> =
665            ::std::sync::LazyLock::new(|| ::unity::lookup::method_info_on_class(<Component as ::unity::ClassIdentity>::class(), "GetComponents", 0));
666        #[allow(clippy::type_complexity)]
667        static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
668            ::std::sync::OnceLock::new();
669        let _ = false;
670        let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
671            ::core::result::Result::Ok(mi) => *mi,
672            ::core::result::Result::Err(e) => {
673                panic!(
674                    "method lookup failed: {}
675::{}
676: {}
677",
678                    <Component as ::unity::ClassIdentity>::NAME,
679                    "GetComponents",
680                    e
681                )
682            },
683        };
684        let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
685        let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
686        let __inflated: &'static ::unity::il2cpp::MethodInfo = {
687            let mut __guard = __cache.lock().unwrap();
688            *__guard
689                .entry(__key)
690                .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
691        };
692        unsafe {
693            let __receiver = <Component as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
694            let __f: extern "C" fn(Component, ::unity::OptionalMethod) -> ::unity::Array<M0> = ::core::mem::transmute(__inflated.method_ptr);
695            let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
696            __f(__receiver, ::core::option::Option::Some(__mi_opaque))
697        }
698    }
699    #[doc = "`CompareTag(::unity::Il2CppString)` overload"]
700    fn compare_tag(self, tag: impl ::core::convert::Into<::unity::Il2CppString>) -> bool {
701        unsafe {
702            let __receiver = <Component as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
703            ::unity::il2cpp_call!((::unity::module_base()+0x2c46a40usize)as*mut u8,bool;
704(Component)__receiver,(::unity::Il2CppString)::core::convert::Into::into(tag))
705        }
706    }
707    #[doc = "`.ctor()` overload"]
708    fn ctor(self) -> () {
709        unsafe {
710            let __receiver = <Component as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
711            ::unity::il2cpp_call!((::unity::module_base()+0x2c37760usize)as*mut u8,();
712(Component)__receiver)
713        }
714    }
715}
716
717#[cfg(feature = "unity_engine-component")]
718impl<__T: IComponent> IComponentMethods for __T {}
719
720#[cfg(feature = "unity_engine-component")]
721impl Component {
722    pub fn get_transform_method_info() -> &'static ::unity::il2cpp::MethodInfo {
723        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
724    }
725
726    pub fn get_game_object_method_info() -> &'static ::unity::il2cpp::MethodInfo {
727        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
728    }
729
730    pub fn get_component_method_info() -> &'static ::unity::il2cpp::MethodInfo {
731        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
732    }
733
734    pub fn get_component_fast_path_method_info() -> &'static ::unity::il2cpp::MethodInfo {
735        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
736    }
737
738    pub fn get_component_in_children_method_info() -> &'static ::unity::il2cpp::MethodInfo {
739        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
740    }
741
742    pub fn get_component_in_parent_method_info() -> &'static ::unity::il2cpp::MethodInfo {
743        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
744    }
745
746    pub fn get_components_for_list_internal_method_info() -> &'static ::unity::il2cpp::MethodInfo {
747        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[18]
748    }
749
750    pub fn get_components_method_info() -> &'static ::unity::il2cpp::MethodInfo {
751        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[19]
752    }
753
754    pub fn get_tag_method_info() -> &'static ::unity::il2cpp::MethodInfo {
755        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[21]
756    }
757
758    pub fn set_tag_method_info() -> &'static ::unity::il2cpp::MethodInfo {
759        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[22]
760    }
761
762    pub fn compare_tag_method_info() -> &'static ::unity::il2cpp::MethodInfo {
763        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[24]
764    }
765
766    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
767        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[25]
768    }
769}
770
771#[cfg(feature = "unity_engine-component")]
772impl Component {
773    #[doc = "`.ctor()` — no args"]
774    pub fn new() -> Self {
775        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
776            panic!(
777                "{}
778::{}
779 failed to instantiate",
780                ::core::stringify!(Component),
781                ::core::stringify!(new),
782            )
783        });
784        <Self as IComponentMethods>::ctor(this);
785        this
786    }
787}
788
789#[cfg(feature = "unity_engine-component")]
790#[doc(hidden)]
791pub mod prelude {
792    pub use super::{Component, IComponent, IComponentMethods};
793    #[cfg(feature = "system-object")]
794    pub use crate::system::object::IObjectMethods;
795    #[cfg(feature = "unity_engine-object_2")]
796    pub use crate::unity_engine::object_2::IObject_2Methods;
797    pub use crate::{system::object::IObject, unity_engine::object_2::IObject_2};
798}