1#[cfg(feature = "app-resourcehandle_2-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/app/resourcehandle_2/ResourceHandle_2.md"))]
11 #[::unity::class(namespace = "App", name = "ResourceHandle")]
12 #[parent(crate::system::object::Object)]
13 pub struct ResourceHandle_2 {
14 #[offset(16)]
15 #[rename(name = "m_Path")]
16 pub m_path: ::unity::Il2CppString,
17 #[offset(24)]
18 #[rename(name = "m_Handle")]
19 pub m_handle: crate::unity_engine::resource_management::async_operations::asyncoperationhandle::AsyncOperationHandle,
20 }
21}
22
23#[cfg(feature = "app-resourcehandle_2-types")]
24pub use __types::*;
25
26#[cfg(feature = "app-resourcehandle_2")]
27pub trait IResourceHandle_2Methods: IResourceHandle_2 {
28 #[doc = "`.ctor()` overload"]
29 fn ctor(self) -> () {
30 unsafe {
31 let __receiver = <ResourceHandle_2 as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
32 ::unity::il2cpp_call!((::unity::module_base()+0x2013860usize)as*mut u8,();
33(ResourceHandle_2)__receiver)
34 }
35 }
36 #[doc = "`Finalize()` overload"]
37 fn finalize(self) -> () {
38 unsafe {
39 let __receiver = <ResourceHandle_2 as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
40 {
41 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
42 let __vi = *__vt.get(1usize).unwrap_or_else(|| {
43 panic!(
44 "unity: virtual slot {}
45 out of range (vtable len {}
46) on the runtime class behind {}
47 (method `{}
48`)",
49 1usize,
50 __vt.len(),
51 <ResourceHandle_2 as ::unity::ClassIdentity>::NAME,
52 "Finalize",
53 )
54 });
55 let __inner: extern "C" fn(ResourceHandle_2, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
56 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
57 __inner(__receiver, __mi)
58 }
59 }
60 }
61 #[doc = "`Reset(::unity::Il2CppString)` overload"]
62 fn reset(self, path: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
63 unsafe {
64 let __receiver = <ResourceHandle_2 as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
65 ::unity::il2cpp_call!((::unity::module_base()+0x2013bb0usize)as*mut u8,();
66(ResourceHandle_2)__receiver,(::unity::Il2CppString)::core::convert::Into::into(path))
67 }
68 }
69 #[doc = "`IsLoading()` overload"]
70 fn is_loading(self) -> bool {
71 unsafe {
72 let __receiver = <ResourceHandle_2 as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
73 ::unity::il2cpp_call!((::unity::module_base()+0x2013bc0usize)as*mut u8,bool;
74(ResourceHandle_2)__receiver)
75 }
76 }
77 #[doc = "`Dispose()` overload"]
78 fn dispose(self) -> () {
79 unsafe {
80 let __receiver = <ResourceHandle_2 as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
81 {
82 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
83 let __vi = *__vt.get(4usize).unwrap_or_else(|| {
84 panic!(
85 "unity: virtual slot {}
86 out of range (vtable len {}
87) on the runtime class behind {}
88 (method `{}
89`)",
90 4usize,
91 __vt.len(),
92 <ResourceHandle_2 as ::unity::ClassIdentity>::NAME,
93 "Dispose",
94 )
95 });
96 let __inner: extern "C" fn(ResourceHandle_2, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
97 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
98 __inner(__receiver, __mi)
99 }
100 }
101 }
102 fn load_async<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
103 self,
104 path: impl ::core::convert::Into<::unity::Il2CppString>,
105 completed: impl ::core::convert::Into<crate::system::action_1::Action_1<M0>>,
106 ) -> () {
107 static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
108 ::unity::lookup::method_info_on_class(<ResourceHandle_2 as ::unity::ClassIdentity>::class(), "LoadAsync", 2)
109 });
110 #[allow(clippy::type_complexity)]
111 static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
112 ::std::sync::OnceLock::new();
113 let _ = false;
114 let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
115 ::core::result::Result::Ok(mi) => *mi,
116 ::core::result::Result::Err(e) => {
117 panic!(
118 "method lookup failed: {}
119::{}
120: {}
121",
122 <ResourceHandle_2 as ::unity::ClassIdentity>::NAME,
123 "LoadAsync",
124 e
125 )
126 },
127 };
128 let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
129 let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
130 let __inflated: &'static ::unity::il2cpp::MethodInfo = {
131 let mut __guard = __cache.lock().unwrap();
132 *__guard
133 .entry(__key)
134 .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
135 };
136 unsafe {
137 let __receiver = <ResourceHandle_2 as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
138 let __f: extern "C" fn(ResourceHandle_2, ::unity::Il2CppString, crate::system::action_1::Action_1<M0>, ::unity::OptionalMethod) -> () =
139 ::core::mem::transmute(__inflated.method_ptr);
140 let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
141 __f(
142 __receiver,
143 ::core::convert::Into::into(path),
144 ::core::convert::Into::into(completed),
145 ::core::option::Option::Some(__mi_opaque),
146 )
147 }
148 }
149 #[doc = "`LoadSceneAsync(::unity::Il2CppString, crate::unity_engine::scene_management::loadscenemode::LoadSceneMode)` overload"]
150 fn load_scene_async(
151 self,
152 path: impl ::core::convert::Into<::unity::Il2CppString>,
153 mode: impl ::core::convert::Into<crate::unity_engine::scene_management::loadscenemode::LoadSceneMode>,
154 ) -> () {
155 unsafe {
156 let __receiver = <ResourceHandle_2 as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
157 ::unity::il2cpp_call!((::unity::module_base()+0x2013cf0usize)as*mut u8,();
158(ResourceHandle_2)__receiver,(::unity::Il2CppString)::core::convert::Into::into(path),(crate::unity_engine::scene_management::loadscenemode::LoadSceneMode)::core::convert::Into::into(mode))
159 }
160 }
161 #[doc = "`UnloadSceneAsync()` overload"]
162 fn unload_scene_async(self) -> () {
163 unsafe {
164 let __receiver = <ResourceHandle_2 as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
165 ::unity::il2cpp_call!((::unity::module_base()+0x2014240usize)as*mut u8,();
166(ResourceHandle_2)__receiver)
167 }
168 }
169 #[doc = "`Release()` overload"]
170 fn release(self) -> () {
171 unsafe {
172 let __receiver = <ResourceHandle_2 as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
173 ::unity::il2cpp_call!((::unity::module_base()+0x2013bf0usize)as*mut u8,();
174(ResourceHandle_2)__receiver)
175 }
176 }
177 #[doc = "`get_Path()` overload"]
178 fn get_path(self) -> ::unity::Il2CppString {
179 unsafe {
180 let __receiver = <ResourceHandle_2 as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
181 ::unity::il2cpp_call!((::unity::module_base()+0x2014890usize)as*mut u8, ::unity::Il2CppString;
182(ResourceHandle_2)__receiver)
183 }
184 }
185 #[doc = "`get_Name()` overload"]
186 fn get_name(self) -> ::unity::Il2CppString {
187 unsafe {
188 let __receiver = <ResourceHandle_2 as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
189 ::unity::il2cpp_call!((::unity::module_base()+0x20148a0usize)as*mut u8, ::unity::Il2CppString;
190(ResourceHandle_2)__receiver)
191 }
192 }
193 fn get_asset<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(self) -> M0 {
194 static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
195 ::unity::lookup::method_info_on_class(<ResourceHandle_2 as ::unity::ClassIdentity>::class(), "GetAsset", 0)
196 });
197 #[allow(clippy::type_complexity)]
198 static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
199 ::std::sync::OnceLock::new();
200 let _ = false;
201 let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
202 ::core::result::Result::Ok(mi) => *mi,
203 ::core::result::Result::Err(e) => {
204 panic!(
205 "method lookup failed: {}
206::{}
207: {}
208",
209 <ResourceHandle_2 as ::unity::ClassIdentity>::NAME,
210 "GetAsset",
211 e
212 )
213 },
214 };
215 let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
216 let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
217 let __inflated: &'static ::unity::il2cpp::MethodInfo = {
218 let mut __guard = __cache.lock().unwrap();
219 *__guard
220 .entry(__key)
221 .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
222 };
223 unsafe {
224 let __receiver = <ResourceHandle_2 as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
225 let __f: extern "C" fn(ResourceHandle_2, ::unity::OptionalMethod) -> M0 = ::core::mem::transmute(__inflated.method_ptr);
226 let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
227 __f(__receiver, ::core::option::Option::Some(__mi_opaque))
228 }
229 }
230 fn instantiate<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
231 self,
232 parent: impl ::core::convert::Into<crate::unity_engine::gameobject::GameObject>,
233 ) -> M0 {
234 static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
235 ::unity::lookup::method_info_on_class(<ResourceHandle_2 as ::unity::ClassIdentity>::class(), "Instantiate", 1)
236 });
237 #[allow(clippy::type_complexity)]
238 static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
239 ::std::sync::OnceLock::new();
240 let _ = false;
241 let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
242 ::core::result::Result::Ok(mi) => *mi,
243 ::core::result::Result::Err(e) => {
244 panic!(
245 "method lookup failed: {}
246::{}
247: {}
248",
249 <ResourceHandle_2 as ::unity::ClassIdentity>::NAME,
250 "Instantiate",
251 e
252 )
253 },
254 };
255 let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
256 let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
257 let __inflated: &'static ::unity::il2cpp::MethodInfo = {
258 let mut __guard = __cache.lock().unwrap();
259 *__guard
260 .entry(__key)
261 .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
262 };
263 unsafe {
264 let __receiver = <ResourceHandle_2 as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
265 let __f: extern "C" fn(ResourceHandle_2, crate::unity_engine::gameobject::GameObject, ::unity::OptionalMethod) -> M0 =
266 ::core::mem::transmute(__inflated.method_ptr);
267 let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
268 __f(__receiver, ::core::convert::Into::into(parent), ::core::option::Option::Some(__mi_opaque))
269 }
270 }
271 fn instantiate_2<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
272 self,
273 parent: impl ::core::convert::Into<crate::unity_engine::transform::Transform>,
274 ) -> M0 {
275 static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
276 ::unity::lookup::method_info_on_class(<ResourceHandle_2 as ::unity::ClassIdentity>::class(), "Instantiate", 1)
277 });
278 #[allow(clippy::type_complexity)]
279 static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
280 ::std::sync::OnceLock::new();
281 let _ = false;
282 let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
283 ::core::result::Result::Ok(mi) => *mi,
284 ::core::result::Result::Err(e) => {
285 panic!(
286 "method lookup failed: {}
287::{}
288: {}
289",
290 <ResourceHandle_2 as ::unity::ClassIdentity>::NAME,
291 "Instantiate",
292 e
293 )
294 },
295 };
296 let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
297 let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
298 let __inflated: &'static ::unity::il2cpp::MethodInfo = {
299 let mut __guard = __cache.lock().unwrap();
300 *__guard
301 .entry(__key)
302 .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
303 };
304 unsafe {
305 let __receiver = <ResourceHandle_2 as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
306 let __f: extern "C" fn(ResourceHandle_2, crate::unity_engine::transform::Transform, ::unity::OptionalMethod) -> M0 =
307 ::core::mem::transmute(__inflated.method_ptr);
308 let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
309 __f(__receiver, ::core::convert::Into::into(parent), ::core::option::Option::Some(__mi_opaque))
310 }
311 }
312}
313
314#[cfg(feature = "app-resourcehandle_2")]
315impl<__T: IResourceHandle_2> IResourceHandle_2Methods for __T {}
316
317#[cfg(feature = "app-resourcehandle_2")]
318impl ResourceHandle_2 {
319 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
320 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
321 }
322
323 pub fn finalize_method_info() -> &'static ::unity::il2cpp::MethodInfo {
324 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
325 }
326
327 pub fn reset_method_info() -> &'static ::unity::il2cpp::MethodInfo {
328 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
329 }
330
331 pub fn is_loading_method_info() -> &'static ::unity::il2cpp::MethodInfo {
332 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
333 }
334
335 pub fn dispose_method_info() -> &'static ::unity::il2cpp::MethodInfo {
336 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
337 }
338
339 pub fn load_scene_async_method_info() -> &'static ::unity::il2cpp::MethodInfo {
340 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
341 }
342
343 pub fn unload_scene_async_method_info() -> &'static ::unity::il2cpp::MethodInfo {
344 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
345 }
346
347 pub fn release_method_info() -> &'static ::unity::il2cpp::MethodInfo {
348 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
349 }
350
351 pub fn get_path_method_info() -> &'static ::unity::il2cpp::MethodInfo {
352 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
353 }
354
355 pub fn get_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
356 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
357 }
358}
359
360#[cfg(feature = "app-resourcehandle_2")]
361impl ResourceHandle_2 {
362 #[doc = "Direct (non-virtual) call to `ResourceHandle_2`'s own `Finalize`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
363 pub unsafe fn finalize(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
364 let __mi = Self::finalize_method_info();
365 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
366 __inner(this.into(), ::core::option::Option::None)
367 }
368
369 #[doc = "Direct (non-virtual) call to `ResourceHandle_2`'s own `Dispose`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
370 pub unsafe fn dispose(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
371 let __mi = Self::dispose_method_info();
372 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
373 __inner(this.into(), ::core::option::Option::None)
374 }
375}
376
377#[cfg(feature = "app-resourcehandle_2")]
378impl ResourceHandle_2 {
379 #[doc = "`.ctor()` — no args"]
380 pub fn new() -> Self {
381 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
382 panic!(
383 "{}
384::{}
385 failed to instantiate",
386 ::core::stringify!(ResourceHandle_2),
387 ::core::stringify!(new),
388 )
389 });
390 <Self as IResourceHandle_2Methods>::ctor(this);
391 this
392 }
393}
394
395#[cfg(feature = "app-resourcehandle_2")]
396#[doc(hidden)]
397pub mod prelude {
398 pub use super::{IResourceHandle_2, IResourceHandle_2Methods, ResourceHandle_2};
399 pub use crate::system::object::IObject;
400 #[cfg(feature = "system-object")]
401 pub use crate::system::object::IObjectMethods;
402}