Skip to main content

engage/generated/unity_engine/addressable_assets/
dynamicresourcelocator.rs

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