Skip to main content

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

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-resource_management-resource_providers-assetbundlelocalresource-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/resource_management/resource_providers/assetbundlelocalresource/AssetBundleLocalResource.md"))]
11    #[::unity::class(namespace = "UnityEngine.ResourceManagement.ResourceProviders", name = "AssetBundleLocalResource")]
12    #[parent(crate::system::object::Object)]
13    pub struct AssetBundleLocalResource {
14        #[offset(16)]
15        #[rename(name = "m_AssetBundle")]
16        pub m_asset_bundle: crate::unity_engine::assetbundle::AssetBundle,
17        #[offset(24)]
18        #[rename(name = "m_RequestOperation")]
19        pub m_request_operation: crate::unity_engine::asyncoperation::AsyncOperation,
20        #[offset(32)]
21        #[rename(name = "m_ProgressHandler")]
22        pub m_progress_handler: crate::system::func_1::Func_1<f32>,
23        #[offset(40)]
24        #[rename(name = "m_WaitForCompletionHandler")]
25        pub m_wait_for_completion_handler: crate::system::func_1::Func_1<bool>,
26        #[offset(48)]
27        #[rename(name = "m_CompleteHandler")]
28        pub m_complete_handler: crate::system::action_1::Action_1<crate::unity_engine::asyncoperation::AsyncOperation>,
29        #[offset(56)]
30        #[rename(name = "m_ProvideHandle")]
31        pub m_provide_handle: crate::unity_engine::resource_management::resource_providers::providehandle::ProvideHandle,
32        #[offset(80)]
33        #[rename(name = "m_Key")]
34        pub m_key: ::unity::Il2CppString,
35        #[offset(88)]
36        #[rename(name = "m_Time")]
37        pub m_time: f32,
38        #[offset(92)]
39        #[rename(name = "m_Completed")]
40        pub m_completed: bool,
41    }
42}
43
44#[cfg(feature = "unity_engine-resource_management-resource_providers-assetbundlelocalresource-types")]
45pub use __types::*;
46
47#[cfg(feature = "unity_engine-resource_management-resource_providers-assetbundlelocalresource")]
48pub trait IAssetBundleLocalResourceMethods: IAssetBundleLocalResource {
49    #[doc = "`GetAssetBundle()` overload"]
50    fn get_asset_bundle(self) -> crate::unity_engine::assetbundle::AssetBundle {
51        unsafe {
52            let __receiver =
53                <AssetBundleLocalResource as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
54            {
55                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
56                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
57                    panic!(
58                        "unity: virtual slot {}
59 out of range (vtable len {}
60) on the runtime class behind {}
61 (method `{}
62`)",
63                        4usize,
64                        __vt.len(),
65                        <AssetBundleLocalResource as ::unity::ClassIdentity>::NAME,
66                        "GetAssetBundle",
67                    )
68                });
69                let __inner: extern "C" fn(AssetBundleLocalResource, ::unity::OptionalMethod) -> crate::unity_engine::assetbundle::AssetBundle =
70                    ::core::mem::transmute(__vi.method_ptr);
71                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
72                __inner(__receiver, __mi)
73            }
74        }
75    }
76    #[doc = "`.ctor()` overload"]
77    fn ctor(self) -> () {
78        unsafe {
79            let __receiver =
80                <AssetBundleLocalResource as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
81            ::unity::il2cpp_call!((::unity::module_base()+0x211a1c0usize)as*mut u8,();
82(AssetBundleLocalResource)__receiver)
83        }
84    }
85    #[doc = "`PercentComplete()` overload"]
86    fn percent_complete(self) -> f32 {
87        unsafe {
88            let __receiver =
89                <AssetBundleLocalResource as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
90            ::unity::il2cpp_call!((::unity::module_base()+0x211a350usize)as*mut u8,f32;
91(AssetBundleLocalResource)__receiver)
92        }
93    }
94    #[doc = "`LocalRequestOperationCompleted(crate::unity_engine::asyncoperation::AsyncOperation)` overload"]
95    fn local_request_operation_completed(self, op: impl ::core::convert::Into<crate::unity_engine::asyncoperation::AsyncOperation>) -> () {
96        unsafe {
97            let __receiver =
98                <AssetBundleLocalResource as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
99            ::unity::il2cpp_call!((::unity::module_base()+0x211a370usize)as*mut u8,();
100(AssetBundleLocalResource)__receiver,(crate::unity_engine::asyncoperation::AsyncOperation)::core::convert::Into::into(op))
101        }
102    }
103    #[doc = "`WaitForCompletionHandler()` overload"]
104    fn wait_for_completion_handler(self) -> bool {
105        unsafe {
106            let __receiver =
107                <AssetBundleLocalResource as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
108            ::unity::il2cpp_call!((::unity::module_base()+0x211a4a0usize)as*mut u8,bool;
109(AssetBundleLocalResource)__receiver)
110        }
111    }
112    #[doc = "`Load(::unity::Il2CppString, crate::unity_engine::resource_management::resource_providers::providehandle::ProvideHandle)` overload"]
113    fn load(
114        self,
115        key: impl ::core::convert::Into<::unity::Il2CppString>,
116        provide_handle: impl ::core::convert::Into<crate::unity_engine::resource_management::resource_providers::providehandle::ProvideHandle>,
117    ) -> () {
118        unsafe {
119            let __receiver =
120                <AssetBundleLocalResource as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
121            ::unity::il2cpp_call!((::unity::module_base()+0x211a4f0usize)as*mut u8,();
122(AssetBundleLocalResource)__receiver,(::unity::Il2CppString)::core::convert::Into::into(key),(crate::unity_engine::resource_management::resource_providers::providehandle::ProvideHandle)::core::convert::Into::into(provide_handle))
123        }
124    }
125    #[doc = "`Unload()` overload"]
126    fn unload(self) -> () {
127        unsafe {
128            let __receiver =
129                <AssetBundleLocalResource as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
130            ::unity::il2cpp_call!((::unity::module_base()+0x211a5c0usize)as*mut u8,();
131(AssetBundleLocalResource)__receiver)
132        }
133    }
134}
135
136#[cfg(feature = "unity_engine-resource_management-resource_providers-assetbundlelocalresource")]
137impl<__T: IAssetBundleLocalResource> IAssetBundleLocalResourceMethods for __T {}
138
139#[cfg(feature = "unity_engine-resource_management-resource_providers-assetbundlelocalresource")]
140impl AssetBundleLocalResource {
141    pub fn get_asset_bundle_method_info() -> &'static ::unity::il2cpp::MethodInfo {
142        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
143    }
144
145    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
146        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
147    }
148
149    pub fn percent_complete_method_info() -> &'static ::unity::il2cpp::MethodInfo {
150        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
151    }
152
153    pub fn local_request_operation_completed_method_info() -> &'static ::unity::il2cpp::MethodInfo {
154        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
155    }
156
157    pub fn wait_for_completion_handler_method_info() -> &'static ::unity::il2cpp::MethodInfo {
158        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
159    }
160
161    pub fn load_method_info() -> &'static ::unity::il2cpp::MethodInfo {
162        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
163    }
164
165    pub fn unload_method_info() -> &'static ::unity::il2cpp::MethodInfo {
166        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
167    }
168}
169
170#[cfg(feature = "unity_engine-resource_management-resource_providers-assetbundlelocalresource")]
171impl AssetBundleLocalResource {
172    #[doc = "Direct (non-virtual) call to `AssetBundleLocalResource`'s own `GetAssetBundle`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
173    pub unsafe fn get_asset_bundle(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::unity_engine::assetbundle::AssetBundle {
174        let __mi = Self::get_asset_bundle_method_info();
175        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::unity_engine::assetbundle::AssetBundle =
176            ::core::mem::transmute(__mi.method_ptr);
177        __inner(this.into(), ::core::option::Option::None)
178    }
179}
180
181#[cfg(feature = "unity_engine-resource_management-resource_providers-assetbundlelocalresource")]
182impl AssetBundleLocalResource {
183    #[doc = "`.ctor()` — no args"]
184    pub fn new() -> Self {
185        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
186            panic!(
187                "{}
188::{}
189 failed to instantiate",
190                ::core::stringify!(AssetBundleLocalResource),
191                ::core::stringify!(new),
192            )
193        });
194        <Self as IAssetBundleLocalResourceMethods>::ctor(this);
195        this
196    }
197}
198
199#[cfg(feature = "unity_engine-resource_management-resource_providers-assetbundlelocalresource")]
200#[doc(hidden)]
201pub mod prelude {
202    pub use super::{AssetBundleLocalResource, IAssetBundleLocalResource, IAssetBundleLocalResourceMethods};
203    pub use crate::system::object::IObject;
204    #[cfg(feature = "system-object")]
205    pub use crate::system::object::IObjectMethods;
206}