Skip to main content

engage/generated/unity_engine/addressable_assets/resource_locators/
legacyresourceslocator.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-addressable_assets-resource_locators-legacyresourceslocator-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::object::{IObject, Object};
9
10    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/addressable_assets/resource_locators/legacyresourceslocator/LegacyResourcesLocator.md"))]
11    #[::unity::class(namespace = "UnityEngine.AddressableAssets.ResourceLocators", name = "LegacyResourcesLocator")]
12    #[parent(crate::system::object::Object)]
13    pub struct LegacyResourcesLocator {}
14}
15
16#[cfg(feature = "unity_engine-addressable_assets-resource_locators-legacyresourceslocator-types")]
17pub use __types::*;
18
19#[cfg(feature = "unity_engine-addressable_assets-resource_locators-legacyresourceslocator")]
20pub trait ILegacyResourcesLocatorMethods: ILegacyResourcesLocator {
21    #[doc = "`Locate(crate::system::object::Object, ::unity::SystemType, *mutcrate::system::collections::generic::ilist_1_interface::IList_1_Interface<crate::unity_engine::resource_management::resource_locations::iresourcelocation::IResourceLocation>)` overload"]
22    fn locate(
23        self,
24        key: impl ::core::convert::Into<crate::system::object::Object>,
25        r#type: impl ::core::convert::Into<::unity::SystemType>,
26    ) -> (
27        bool,
28        crate::system::collections::generic::ilist_1_interface::IList_1_Interface<
29            crate::unity_engine::resource_management::resource_locations::iresourcelocation::IResourceLocation,
30        >,
31    ) {
32        unsafe {
33            let __receiver =
34                <LegacyResourcesLocator as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
35            let mut __out_0 = ::core::mem::MaybeUninit::<
36                crate::system::collections::generic::ilist_1_interface::IList_1_Interface<
37                    crate::unity_engine::resource_management::resource_locations::iresourcelocation::IResourceLocation,
38                >,
39            >::uninit();
40            let __ret = {
41                {
42                    let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
43                    let __vi = *__vt.get(6usize).unwrap_or_else(|| {
44                        panic!(
45                            "unity: virtual slot {}
46 out of range (vtable len {}
47) on the runtime class behind {}
48 (method `{}
49`)",
50                            6usize,
51                            __vt.len(),
52                            <LegacyResourcesLocator as ::unity::ClassIdentity>::NAME,
53                            "Locate",
54                        )
55                    });
56                    let __inner: extern "C" fn(
57                        LegacyResourcesLocator,
58                        crate::system::object::Object,
59                        ::unity::SystemType,
60                        *mut crate::system::collections::generic::ilist_1_interface::IList_1_Interface<
61                            crate::unity_engine::resource_management::resource_locations::iresourcelocation::IResourceLocation,
62                        >,
63                        ::unity::OptionalMethod,
64                    ) -> bool = ::core::mem::transmute(__vi.method_ptr);
65                    let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
66                    __inner(
67                        __receiver,
68                        ::core::convert::Into::into(key),
69                        ::core::convert::Into::into(r#type),
70                        __out_0.as_mut_ptr(),
71                        __mi,
72                    )
73                }
74            };
75            (__ret, __out_0.assume_init())
76        }
77    }
78    #[doc = "`get_Keys()` overload"]
79    fn get_keys(self) -> crate::system::collections::generic::ienumerable_1::IEnumerable_1<crate::system::object::Object> {
80        unsafe {
81            let __receiver =
82                <LegacyResourcesLocator as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
83            {
84                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
85                let __vi = *__vt.get(5usize).unwrap_or_else(|| {
86                    panic!(
87                        "unity: virtual slot {}
88 out of range (vtable len {}
89) on the runtime class behind {}
90 (method `{}
91`)",
92                        5usize,
93                        __vt.len(),
94                        <LegacyResourcesLocator as ::unity::ClassIdentity>::NAME,
95                        "get_Keys",
96                    )
97                });
98                let __inner: extern "C" fn(
99                    LegacyResourcesLocator,
100                    ::unity::OptionalMethod,
101                )
102                    -> crate::system::collections::generic::ienumerable_1::IEnumerable_1<crate::system::object::Object> =
103                    ::core::mem::transmute(__vi.method_ptr);
104                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
105                __inner(__receiver, __mi)
106            }
107        }
108    }
109    #[doc = "`get_LocatorId()` overload"]
110    fn get_locator_id(self) -> ::unity::Il2CppString {
111        unsafe {
112            let __receiver =
113                <LegacyResourcesLocator as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
114            {
115                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
116                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
117                    panic!(
118                        "unity: virtual slot {}
119 out of range (vtable len {}
120) on the runtime class behind {}
121 (method `{}
122`)",
123                        4usize,
124                        __vt.len(),
125                        <LegacyResourcesLocator as ::unity::ClassIdentity>::NAME,
126                        "get_LocatorId",
127                    )
128                });
129                let __inner: extern "C" fn(LegacyResourcesLocator, ::unity::OptionalMethod) -> ::unity::Il2CppString =
130                    ::core::mem::transmute(__vi.method_ptr);
131                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
132                __inner(__receiver, __mi)
133            }
134        }
135    }
136    #[doc = "`.ctor()` overload"]
137    fn ctor(self) -> () {
138        unsafe {
139            let __receiver =
140                <LegacyResourcesLocator as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
141            ::unity::il2cpp_call!((::unity::module_base()+0x2dbb7f0usize)as*mut u8,();
142(LegacyResourcesLocator)__receiver)
143        }
144    }
145}
146
147#[cfg(feature = "unity_engine-addressable_assets-resource_locators-legacyresourceslocator")]
148impl<__T: ILegacyResourcesLocator> ILegacyResourcesLocatorMethods for __T {}
149
150#[cfg(feature = "unity_engine-addressable_assets-resource_locators-legacyresourceslocator")]
151impl LegacyResourcesLocator {
152    pub fn locate_method_info() -> &'static ::unity::il2cpp::MethodInfo {
153        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
154    }
155
156    pub fn get_keys_method_info() -> &'static ::unity::il2cpp::MethodInfo {
157        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
158    }
159
160    pub fn get_locator_id_method_info() -> &'static ::unity::il2cpp::MethodInfo {
161        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
162    }
163
164    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
165        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
166    }
167}
168
169#[cfg(feature = "unity_engine-addressable_assets-resource_locators-legacyresourceslocator")]
170impl LegacyResourcesLocator {
171    #[doc = "Direct (non-virtual) call to `LegacyResourcesLocator`'s own `Locate`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
172    pub unsafe fn locate(
173        this: impl ::core::convert::Into<::unity::IlInstance>,
174        key: crate::system::object::Object,
175        r#type: ::unity::SystemType,
176        locations: *mut crate::system::collections::generic::ilist_1_interface::IList_1_Interface<
177            crate::unity_engine::resource_management::resource_locations::iresourcelocation::IResourceLocation,
178        >,
179    ) -> bool {
180        let __mi = Self::locate_method_info();
181        let __inner: extern "C" fn(
182            ::unity::IlInstance,
183            crate::system::object::Object,
184            ::unity::SystemType,
185            *mut crate::system::collections::generic::ilist_1_interface::IList_1_Interface<
186                crate::unity_engine::resource_management::resource_locations::iresourcelocation::IResourceLocation,
187            >,
188            ::unity::OptionalMethod,
189        ) -> bool = ::core::mem::transmute(__mi.method_ptr);
190        __inner(this.into(), key, r#type, locations, ::core::option::Option::None)
191    }
192
193    #[doc = "Direct (non-virtual) call to `LegacyResourcesLocator`'s own `get_Keys`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
194    pub unsafe fn get_keys(
195        this: impl ::core::convert::Into<::unity::IlInstance>,
196    ) -> crate::system::collections::generic::ienumerable_1::IEnumerable_1<crate::system::object::Object> {
197        let __mi = Self::get_keys_method_info();
198        let __inner: extern "C" fn(
199            ::unity::IlInstance,
200            ::unity::OptionalMethod,
201        ) -> crate::system::collections::generic::ienumerable_1::IEnumerable_1<crate::system::object::Object> =
202            ::core::mem::transmute(__mi.method_ptr);
203        __inner(this.into(), ::core::option::Option::None)
204    }
205
206    #[doc = "Direct (non-virtual) call to `LegacyResourcesLocator`'s own `get_LocatorId`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
207    pub unsafe fn get_locator_id(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
208        let __mi = Self::get_locator_id_method_info();
209        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
210        __inner(this.into(), ::core::option::Option::None)
211    }
212}
213
214#[cfg(feature = "unity_engine-addressable_assets-resource_locators-legacyresourceslocator")]
215impl LegacyResourcesLocator {
216    #[doc = "`.ctor()` — no args"]
217    pub fn new() -> Self {
218        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
219            panic!(
220                "{}
221::{}
222 failed to instantiate",
223                ::core::stringify!(LegacyResourcesLocator),
224                ::core::stringify!(new),
225            )
226        });
227        <Self as ILegacyResourcesLocatorMethods>::ctor(this);
228        this
229    }
230}
231
232#[cfg(feature = "unity_engine-addressable_assets-resource_locators-legacyresourceslocator")]
233#[doc(hidden)]
234pub mod prelude {
235    pub use super::{ILegacyResourcesLocator, ILegacyResourcesLocatorMethods, LegacyResourcesLocator};
236    pub use crate::system::object::IObject;
237    #[cfg(feature = "system-object")]
238    pub use crate::system::object::IObjectMethods;
239}