Skip to main content

engage/generated/unity_engine/resource_management/resource_providers/
legacyresourcesprovider.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-resource_management-resource_providers-legacyresourcesprovider-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::resource_management::resource_providers::resourceproviderbase::{IResourceProviderBase, ResourceProviderBase},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/resource_management/resource_providers/legacyresourcesprovider/LegacyResourcesProvider_InternalOp.md"))]
14    #[::unity::class(
15        namespace = "UnityEngine.ResourceManagement.ResourceProviders",
16        name = "LegacyResourcesProvider.InternalOp"
17    )]
18    #[parent(crate::system::object::Object)]
19    pub struct LegacyResourcesProvider_InternalOp {
20        #[offset(16)]
21        #[rename(name = "m_RequestOperation")]
22        pub m_request_operation: crate::unity_engine::asyncoperation::AsyncOperation,
23        #[offset(24)]
24        #[rename(name = "m_ProvideHandle")]
25        pub m_provide_handle: crate::unity_engine::resource_management::resource_providers::providehandle::ProvideHandle,
26    }
27
28    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/resource_management/resource_providers/legacyresourcesprovider/LegacyResourcesProvider.md"))]
29    #[::unity::class(namespace = "UnityEngine.ResourceManagement.ResourceProviders", name = "LegacyResourcesProvider")]
30    #[parent(crate::unity_engine::resource_management::resource_providers::resourceproviderbase::ResourceProviderBase)]
31    pub struct LegacyResourcesProvider {}
32}
33
34#[cfg(feature = "unity_engine-resource_management-resource_providers-legacyresourcesprovider-types")]
35pub use __types::*;
36
37#[cfg(feature = "unity_engine-resource_management-resource_providers-legacyresourcesprovider")]
38#[doc(hidden)]
39#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
40mod __LegacyResourcesProvider_InternalOp_unity_raw {
41    use super::*;
42    #[doc(hidden)]
43    #[allow(non_snake_case)]
44    pub mod __lookup_start {
45        use super::*;
46        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
47            let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
48                &[<crate::unity_engine::resource_management::resource_providers::providehandle::ProvideHandle as ::unity::IlType>::il_type()];
49            ::unity::lookup::method_info_on_class_with_signature(
50                <LegacyResourcesProvider_InternalOp as ::unity::ClassIdentity>::class(),
51                "Start",
52                1,
53                param_types,
54                false,
55            )
56        });
57        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
58            match &*METHOD {
59                ::core::result::Result::Ok(mi) => *mi,
60                ::core::result::Result::Err(e) => {
61                    panic!(
62                        "method lookup failed: {}
63::{}
64: {}
65",
66                        <LegacyResourcesProvider_InternalOp as ::unity::ClassIdentity>::NAME,
67                        "Start",
68                        e
69                    )
70                },
71            }
72        }
73    }
74    #[doc(hidden)]
75    #[allow(non_snake_case)]
76    pub mod __lookup_async_operation_completed {
77        use super::*;
78        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
79            let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
80                &[<crate::unity_engine::asyncoperation::AsyncOperation as ::unity::IlType>::il_type()];
81            ::unity::lookup::method_info_on_class_with_signature(
82                <LegacyResourcesProvider_InternalOp as ::unity::ClassIdentity>::class(),
83                "AsyncOperationCompleted",
84                1,
85                param_types,
86                false,
87            )
88        });
89        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
90            match &*METHOD {
91                ::core::result::Result::Ok(mi) => *mi,
92                ::core::result::Result::Err(e) => {
93                    panic!(
94                        "method lookup failed: {}
95::{}
96: {}
97",
98                        <LegacyResourcesProvider_InternalOp as ::unity::ClassIdentity>::NAME,
99                        "AsyncOperationCompleted",
100                        e
101                    )
102                },
103            }
104        }
105    }
106    #[doc(hidden)]
107    #[allow(non_snake_case)]
108    pub mod __lookup_percent_complete {
109        use super::*;
110        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
111            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
112            ::unity::lookup::method_info_on_class_with_signature(
113                <LegacyResourcesProvider_InternalOp as ::unity::ClassIdentity>::class(),
114                "PercentComplete",
115                0,
116                param_types,
117                false,
118            )
119        });
120        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
121            match &*METHOD {
122                ::core::result::Result::Ok(mi) => *mi,
123                ::core::result::Result::Err(e) => {
124                    panic!(
125                        "method lookup failed: {}
126::{}
127: {}
128",
129                        <LegacyResourcesProvider_InternalOp as ::unity::ClassIdentity>::NAME,
130                        "PercentComplete",
131                        e
132                    )
133                },
134            }
135        }
136    }
137    #[doc(hidden)]
138    #[allow(non_snake_case)]
139    pub mod __lookup_ctor {
140        use super::*;
141        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
142            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
143            ::unity::lookup::method_info_on_class_with_signature(
144                <LegacyResourcesProvider_InternalOp as ::unity::ClassIdentity>::class(),
145                ".ctor",
146                0,
147                param_types,
148                false,
149            )
150        });
151        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
152            match &*METHOD {
153                ::core::result::Result::Ok(mi) => *mi,
154                ::core::result::Result::Err(e) => {
155                    panic!(
156                        "method lookup failed: {}
157::{}
158: {}
159",
160                        <LegacyResourcesProvider_InternalOp as ::unity::ClassIdentity>::NAME,
161                        ".ctor",
162                        e
163                    )
164                },
165            }
166        }
167    }
168}
169
170#[cfg(feature = "unity_engine-resource_management-resource_providers-legacyresourcesprovider")]
171pub trait ILegacyResourcesProvider_InternalOpMethods: ILegacyResourcesProvider_InternalOp {
172    #[doc = "`Start(crate::unity_engine::resource_management::resource_providers::providehandle::ProvideHandle)` overload"]
173    fn start(
174        self,
175        provide_handle: impl ::core::convert::Into<crate::unity_engine::resource_management::resource_providers::providehandle::ProvideHandle>,
176    ) -> () {
177        unsafe {
178            let __receiver =
179                <LegacyResourcesProvider_InternalOp as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
180            ::unity::il2cpp_call!(__LegacyResourcesProvider_InternalOp_unity_raw::__lookup_start::get_method_info().method_ptr,();
181(LegacyResourcesProvider_InternalOp)__receiver,(crate::unity_engine::resource_management::resource_providers::providehandle::ProvideHandle)::core::convert::Into::into(provide_handle))
182        }
183    }
184    #[doc = "`AsyncOperationCompleted(crate::unity_engine::asyncoperation::AsyncOperation)` overload"]
185    fn async_operation_completed(self, op: impl ::core::convert::Into<crate::unity_engine::asyncoperation::AsyncOperation>) -> () {
186        unsafe {
187            let __receiver =
188                <LegacyResourcesProvider_InternalOp as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
189            ::unity::il2cpp_call!(__LegacyResourcesProvider_InternalOp_unity_raw::__lookup_async_operation_completed::get_method_info().method_ptr,();
190(LegacyResourcesProvider_InternalOp)__receiver,(crate::unity_engine::asyncoperation::AsyncOperation)::core::convert::Into::into(op))
191        }
192    }
193    #[doc = "`PercentComplete()` overload"]
194    fn percent_complete(self) -> f32 {
195        unsafe {
196            let __receiver =
197                <LegacyResourcesProvider_InternalOp as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
198            ::unity::il2cpp_call!(__LegacyResourcesProvider_InternalOp_unity_raw::__lookup_percent_complete::get_method_info().method_ptr,f32;
199(LegacyResourcesProvider_InternalOp)__receiver)
200        }
201    }
202    #[doc = "`.ctor()` overload"]
203    fn ctor(self) -> () {
204        unsafe {
205            let __receiver =
206                <LegacyResourcesProvider_InternalOp as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
207            ::unity::il2cpp_call!(__LegacyResourcesProvider_InternalOp_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
208(LegacyResourcesProvider_InternalOp)__receiver)
209        }
210    }
211}
212
213#[cfg(feature = "unity_engine-resource_management-resource_providers-legacyresourcesprovider")]
214impl<__T: ILegacyResourcesProvider_InternalOp> ILegacyResourcesProvider_InternalOpMethods for __T {}
215
216#[cfg(feature = "unity_engine-resource_management-resource_providers-legacyresourcesprovider")]
217impl LegacyResourcesProvider_InternalOp {
218    pub fn start_method_info() -> &'static ::unity::il2cpp::MethodInfo {
219        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
220    }
221
222    pub fn async_operation_completed_method_info() -> &'static ::unity::il2cpp::MethodInfo {
223        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
224    }
225
226    pub fn percent_complete_method_info() -> &'static ::unity::il2cpp::MethodInfo {
227        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
228    }
229
230    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
231        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
232    }
233}
234
235#[cfg(feature = "unity_engine-resource_management-resource_providers-legacyresourcesprovider")]
236impl LegacyResourcesProvider_InternalOp {
237    #[doc = "`.ctor()` — no args"]
238    pub fn new() -> Self {
239        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
240            panic!(
241                "{}
242::{}
243 failed to instantiate",
244                ::core::stringify!(LegacyResourcesProvider_InternalOp),
245                ::core::stringify!(new),
246            )
247        });
248        <Self as ILegacyResourcesProvider_InternalOpMethods>::ctor(this);
249        this
250    }
251}
252
253#[cfg(feature = "unity_engine-resource_management-resource_providers-legacyresourcesprovider")]
254#[doc(hidden)]
255#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
256mod __LegacyResourcesProvider_unity_raw {
257    use super::*;
258    #[doc(hidden)]
259    #[allow(non_snake_case)]
260    pub mod __lookup_ctor {
261        use super::*;
262        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
263            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
264            ::unity::lookup::method_info_on_class_with_signature(
265                <LegacyResourcesProvider as ::unity::ClassIdentity>::class(),
266                ".ctor",
267                0,
268                param_types,
269                false,
270            )
271        });
272        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
273            match &*METHOD {
274                ::core::result::Result::Ok(mi) => *mi,
275                ::core::result::Result::Err(e) => {
276                    panic!(
277                        "method lookup failed: {}
278::{}
279: {}
280",
281                        <LegacyResourcesProvider as ::unity::ClassIdentity>::NAME,
282                        ".ctor",
283                        e
284                    )
285                },
286            }
287        }
288    }
289}
290
291#[cfg(feature = "unity_engine-resource_management-resource_providers-legacyresourcesprovider")]
292pub trait ILegacyResourcesProviderMethods: ILegacyResourcesProvider {
293    #[doc = "`Provide(crate::unity_engine::resource_management::resource_providers::providehandle::ProvideHandle)` overload"]
294    fn provide(
295        self,
296        pi: impl ::core::convert::Into<crate::unity_engine::resource_management::resource_providers::providehandle::ProvideHandle>,
297    ) -> () {
298        unsafe {
299            let __receiver =
300                <LegacyResourcesProvider as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
301            {
302                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
303                let __vi = *__vt.get(17usize).unwrap_or_else(|| {
304                    panic!(
305                        "unity: virtual slot {}
306 out of range (vtable len {}
307) on the runtime class behind {}
308 (method `{}
309`)",
310                        17usize,
311                        __vt.len(),
312                        <LegacyResourcesProvider as ::unity::ClassIdentity>::NAME,
313                        "Provide",
314                    )
315                });
316                let __inner: extern "C" fn(
317                    LegacyResourcesProvider,
318                    crate::unity_engine::resource_management::resource_providers::providehandle::ProvideHandle,
319                    ::unity::OptionalMethod,
320                ) -> () = ::core::mem::transmute(__vi.method_ptr);
321                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
322                __inner(__receiver, ::core::convert::Into::into(pi), __mi)
323            }
324        }
325    }
326    #[doc = "`Release(crate::unity_engine::resource_management::resource_locations::iresourcelocation::IResourceLocation, crate::system::object::Object)` overload"]
327    fn release(
328        self,
329        location: impl ::core::convert::Into<crate::unity_engine::resource_management::resource_locations::iresourcelocation::IResourceLocation>,
330        asset: impl ::core::convert::Into<crate::system::object::Object>,
331    ) -> () {
332        unsafe {
333            let __receiver =
334                <LegacyResourcesProvider as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
335            {
336                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
337                let __vi = *__vt.get(15usize).unwrap_or_else(|| {
338                    panic!(
339                        "unity: virtual slot {}
340 out of range (vtable len {}
341) on the runtime class behind {}
342 (method `{}
343`)",
344                        15usize,
345                        __vt.len(),
346                        <LegacyResourcesProvider as ::unity::ClassIdentity>::NAME,
347                        "Release",
348                    )
349                });
350                let __inner: extern "C" fn(
351                    LegacyResourcesProvider,
352                    crate::unity_engine::resource_management::resource_locations::iresourcelocation::IResourceLocation,
353                    crate::system::object::Object,
354                    ::unity::OptionalMethod,
355                ) -> () = ::core::mem::transmute(__vi.method_ptr);
356                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
357                __inner(
358                    __receiver,
359                    ::core::convert::Into::into(location),
360                    ::core::convert::Into::into(asset),
361                    __mi,
362                )
363            }
364        }
365    }
366    #[doc = "`.ctor()` overload"]
367    fn ctor(self) -> () {
368        unsafe {
369            let __receiver =
370                <LegacyResourcesProvider as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
371            ::unity::il2cpp_call!(__LegacyResourcesProvider_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
372(LegacyResourcesProvider)__receiver)
373        }
374    }
375}
376
377#[cfg(feature = "unity_engine-resource_management-resource_providers-legacyresourcesprovider")]
378impl<__T: ILegacyResourcesProvider> ILegacyResourcesProviderMethods for __T {}
379
380#[cfg(feature = "unity_engine-resource_management-resource_providers-legacyresourcesprovider")]
381impl LegacyResourcesProvider {
382    pub fn provide_method_info() -> &'static ::unity::il2cpp::MethodInfo {
383        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
384    }
385
386    pub fn release_method_info() -> &'static ::unity::il2cpp::MethodInfo {
387        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
388    }
389
390    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
391        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
392    }
393}
394
395#[cfg(feature = "unity_engine-resource_management-resource_providers-legacyresourcesprovider")]
396impl LegacyResourcesProvider {
397    #[doc = "Direct (non-virtual) call to `LegacyResourcesProvider`'s own `Provide`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
398    pub unsafe fn provide(
399        this: impl ::core::convert::Into<::unity::IlInstance>,
400        pi: crate::unity_engine::resource_management::resource_providers::providehandle::ProvideHandle,
401    ) -> () {
402        let __mi = Self::provide_method_info();
403        let __inner: extern "C" fn(
404            ::unity::IlInstance,
405            crate::unity_engine::resource_management::resource_providers::providehandle::ProvideHandle,
406            ::unity::OptionalMethod,
407        ) -> () = ::core::mem::transmute(__mi.method_ptr);
408        __inner(this.into(), pi, ::core::option::Option::None)
409    }
410
411    #[doc = "Direct (non-virtual) call to `LegacyResourcesProvider`'s own `Release`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
412    pub unsafe fn release(
413        this: impl ::core::convert::Into<::unity::IlInstance>,
414        location: crate::unity_engine::resource_management::resource_locations::iresourcelocation::IResourceLocation,
415        asset: crate::system::object::Object,
416    ) -> () {
417        let __mi = Self::release_method_info();
418        let __inner: extern "C" fn(
419            ::unity::IlInstance,
420            crate::unity_engine::resource_management::resource_locations::iresourcelocation::IResourceLocation,
421            crate::system::object::Object,
422            ::unity::OptionalMethod,
423        ) -> () = ::core::mem::transmute(__mi.method_ptr);
424        __inner(this.into(), location, asset, ::core::option::Option::None)
425    }
426}
427
428#[cfg(feature = "unity_engine-resource_management-resource_providers-legacyresourcesprovider")]
429impl LegacyResourcesProvider {
430    #[doc = "`.ctor()` — no args"]
431    pub fn new() -> Self {
432        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
433            panic!(
434                "{}
435::{}
436 failed to instantiate",
437                ::core::stringify!(LegacyResourcesProvider),
438                ::core::stringify!(new),
439            )
440        });
441        <Self as ILegacyResourcesProviderMethods>::ctor(this);
442        this
443    }
444}
445
446#[cfg(feature = "unity_engine-resource_management-resource_providers-legacyresourcesprovider")]
447#[doc(hidden)]
448pub mod prelude {
449    pub use super::{
450        ILegacyResourcesProvider, ILegacyResourcesProviderMethods, ILegacyResourcesProvider_InternalOp, ILegacyResourcesProvider_InternalOpMethods,
451        LegacyResourcesProvider, LegacyResourcesProvider_InternalOp,
452    };
453    #[cfg(feature = "system-object")]
454    pub use crate::system::object::IObjectMethods;
455    #[cfg(feature = "unity_engine-resource_management-resource_providers-resourceproviderbase")]
456    pub use crate::unity_engine::resource_management::resource_providers::resourceproviderbase::IResourceProviderBaseMethods;
457    pub use crate::{system::object::IObject, unity_engine::resource_management::resource_providers::resourceproviderbase::IResourceProviderBase};
458}