1#[cfg(feature = "unity_engine-addressable_assets-assetreference-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/assetreference/AssetReference.md"))]
11 #[::unity::class(namespace = "UnityEngine.AddressableAssets", name = "AssetReference")]
12 #[parent(crate::system::object::Object)]
13 pub struct AssetReference {
14 #[offset(16)]
15 #[rename(name = "m_AssetGUID")]
16 pub m_asset_guid: ::unity::Il2CppString,
17 #[offset(24)]
18 #[rename(name = "m_SubObjectName")]
19 pub m_sub_object_name: ::unity::Il2CppString,
20 #[offset(32)]
21 #[rename(name = "m_SubObjectType")]
22 pub m_sub_object_type: ::unity::Il2CppString,
23 #[offset(40)]
24 #[rename(name = "m_Operation")]
25 pub m_operation: crate::unity_engine::resource_management::async_operations::asyncoperationhandle::AsyncOperationHandle,
26 }
27}
28
29#[cfg(feature = "unity_engine-addressable_assets-assetreference-types")]
30pub use __types::*;
31
32#[cfg(feature = "unity_engine-addressable_assets-assetreference")]
33impl AssetReference {
34 pub fn create_failed_operation<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
35 ) -> crate::unity_engine::resource_management::async_operations::asyncoperationhandle_1::AsyncOperationHandle_1<M0> {
36 static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
37 ::unity::lookup::method_info_on_class(<AssetReference as ::unity::ClassIdentity>::class(), "CreateFailedOperation", 0)
38 });
39 #[allow(clippy::type_complexity)]
40 static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
41 ::std::sync::OnceLock::new();
42 let _ = true;
43 let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
44 ::core::result::Result::Ok(mi) => *mi,
45 ::core::result::Result::Err(e) => {
46 panic!(
47 "method lookup failed: {}
48::{}
49: {}
50",
51 <AssetReference as ::unity::ClassIdentity>::NAME,
52 "CreateFailedOperation",
53 e
54 )
55 },
56 };
57 let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
58 let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
59 let __inflated: &'static ::unity::il2cpp::MethodInfo = {
60 let mut __guard = __cache.lock().unwrap();
61 *__guard
62 .entry(__key)
63 .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
64 };
65 unsafe {
66 let __f: extern "C" fn(
67 ::unity::OptionalMethod,
68 )
69 -> crate::unity_engine::resource_management::async_operations::asyncoperationhandle_1::AsyncOperationHandle_1<M0> =
70 ::core::mem::transmute(__inflated.method_ptr);
71 let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
72 __f(::core::option::Option::Some(__mi_opaque))
73 }
74 }
75}
76
77#[cfg(feature = "unity_engine-addressable_assets-assetreference")]
78pub trait IAssetReferenceMethods: IAssetReference {
79 #[doc = "`get_OperationHandle()` overload"]
80 fn get_operation_handle(self) -> crate::unity_engine::resource_management::async_operations::asyncoperationhandle::AsyncOperationHandle {
81 unsafe {
82 let __receiver = <AssetReference as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
83 ::unity::il2cpp_call!((::unity::module_base()+0x2db22c0usize)as*mut u8,crate::unity_engine::resource_management::async_operations::asyncoperationhandle::AsyncOperationHandle;
84(AssetReference)__receiver)
85 }
86 }
87 #[doc = "`get_RuntimeKey()` overload"]
88 fn get_runtime_key(self) -> crate::system::object::Object {
89 unsafe {
90 let __receiver = <AssetReference as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
91 {
92 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
93 let __vi = *__vt.get(6usize).unwrap_or_else(|| {
94 panic!(
95 "unity: virtual slot {}
96 out of range (vtable len {}
97) on the runtime class behind {}
98 (method `{}
99`)",
100 6usize,
101 __vt.len(),
102 <AssetReference as ::unity::ClassIdentity>::NAME,
103 "get_RuntimeKey",
104 )
105 });
106 let __inner: extern "C" fn(AssetReference, ::unity::OptionalMethod) -> crate::system::object::Object =
107 ::core::mem::transmute(__vi.method_ptr);
108 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
109 __inner(__receiver, __mi)
110 }
111 }
112 }
113 #[doc = "`get_AssetGUID()` overload"]
114 fn get_asset_guid(self) -> ::unity::Il2CppString {
115 unsafe {
116 let __receiver = <AssetReference as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
117 {
118 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
119 let __vi = *__vt.get(7usize).unwrap_or_else(|| {
120 panic!(
121 "unity: virtual slot {}
122 out of range (vtable len {}
123) on the runtime class behind {}
124 (method `{}
125`)",
126 7usize,
127 __vt.len(),
128 <AssetReference as ::unity::ClassIdentity>::NAME,
129 "get_AssetGUID",
130 )
131 });
132 let __inner: extern "C" fn(AssetReference, ::unity::OptionalMethod) -> ::unity::Il2CppString =
133 ::core::mem::transmute(__vi.method_ptr);
134 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
135 __inner(__receiver, __mi)
136 }
137 }
138 }
139 #[doc = "`get_SubObjectName()` overload"]
140 fn get_sub_object_name(self) -> ::unity::Il2CppString {
141 unsafe {
142 let __receiver = <AssetReference as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
143 {
144 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
145 let __vi = *__vt.get(8usize).unwrap_or_else(|| {
146 panic!(
147 "unity: virtual slot {}
148 out of range (vtable len {}
149) on the runtime class behind {}
150 (method `{}
151`)",
152 8usize,
153 __vt.len(),
154 <AssetReference as ::unity::ClassIdentity>::NAME,
155 "get_SubObjectName",
156 )
157 });
158 let __inner: extern "C" fn(AssetReference, ::unity::OptionalMethod) -> ::unity::Il2CppString =
159 ::core::mem::transmute(__vi.method_ptr);
160 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
161 __inner(__receiver, __mi)
162 }
163 }
164 }
165 #[doc = "`set_SubObjectName(::unity::Il2CppString)` overload"]
166 fn set_sub_object_name(self, value: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
167 unsafe {
168 let __receiver = <AssetReference as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
169 {
170 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
171 let __vi = *__vt.get(9usize).unwrap_or_else(|| {
172 panic!(
173 "unity: virtual slot {}
174 out of range (vtable len {}
175) on the runtime class behind {}
176 (method `{}
177`)",
178 9usize,
179 __vt.len(),
180 <AssetReference as ::unity::ClassIdentity>::NAME,
181 "set_SubObjectName",
182 )
183 });
184 let __inner: extern "C" fn(AssetReference, ::unity::Il2CppString, ::unity::OptionalMethod) -> () =
185 ::core::mem::transmute(__vi.method_ptr);
186 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
187 __inner(__receiver, ::core::convert::Into::into(value), __mi)
188 }
189 }
190 }
191 #[doc = "`get_SubOjbectType()` overload"]
192 fn get_sub_ojbect_type(self) -> ::unity::SystemType {
193 unsafe {
194 let __receiver = <AssetReference as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
195 {
196 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
197 let __vi = *__vt.get(10usize).unwrap_or_else(|| {
198 panic!(
199 "unity: virtual slot {}
200 out of range (vtable len {}
201) on the runtime class behind {}
202 (method `{}
203`)",
204 10usize,
205 __vt.len(),
206 <AssetReference as ::unity::ClassIdentity>::NAME,
207 "get_SubOjbectType",
208 )
209 });
210 let __inner: extern "C" fn(AssetReference, ::unity::OptionalMethod) -> ::unity::SystemType = ::core::mem::transmute(__vi.method_ptr);
211 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
212 __inner(__receiver, __mi)
213 }
214 }
215 }
216 #[doc = "`IsValid()` overload"]
217 fn is_valid(self) -> bool {
218 unsafe {
219 let __receiver = <AssetReference as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
220 ::unity::il2cpp_call!((::unity::module_base()+0x2db2480usize)as*mut u8,bool;
221(AssetReference)__receiver)
222 }
223 }
224 #[doc = "`get_IsDone()` overload"]
225 fn get_is_done(self) -> bool {
226 unsafe {
227 let __receiver = <AssetReference as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
228 ::unity::il2cpp_call!((::unity::module_base()+0x2db2490usize)as*mut u8,bool;
229(AssetReference)__receiver)
230 }
231 }
232 #[doc = "`.ctor()` overload"]
233 fn ctor(self) -> () {
234 unsafe {
235 let __receiver = <AssetReference as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
236 ::unity::il2cpp_call!((::unity::module_base()+0x2db24a0usize)as*mut u8,();
237(AssetReference)__receiver)
238 }
239 }
240 #[doc = "`.ctor(::unity::Il2CppString)` overload"]
241 fn ctor_2(self, guid: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
242 unsafe {
243 let __receiver = <AssetReference as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
244 ::unity::il2cpp_call!((::unity::module_base()+0x2db2510usize)as*mut u8,();
245(AssetReference)__receiver,(::unity::Il2CppString)::core::convert::Into::into(guid))
246 }
247 }
248 #[doc = "`get_Asset()` overload"]
249 fn get_asset(self) -> crate::unity_engine::object_2::Object_2 {
250 unsafe {
251 let __receiver = <AssetReference as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
252 {
253 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
254 let __vi = *__vt.get(11usize).unwrap_or_else(|| {
255 panic!(
256 "unity: virtual slot {}
257 out of range (vtable len {}
258) on the runtime class behind {}
259 (method `{}
260`)",
261 11usize,
262 __vt.len(),
263 <AssetReference as ::unity::ClassIdentity>::NAME,
264 "get_Asset",
265 )
266 });
267 let __inner: extern "C" fn(AssetReference, ::unity::OptionalMethod) -> crate::unity_engine::object_2::Object_2 =
268 ::core::mem::transmute(__vi.method_ptr);
269 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
270 __inner(__receiver, __mi)
271 }
272 }
273 }
274 #[doc = "`ToString()` overload"]
275 fn to_string(self) -> ::unity::Il2CppString {
276 unsafe {
277 let __receiver = <AssetReference as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
278 {
279 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
280 let __vi = *__vt.get(3usize).unwrap_or_else(|| {
281 panic!(
282 "unity: virtual slot {}
283 out of range (vtable len {}
284) on the runtime class behind {}
285 (method `{}
286`)",
287 3usize,
288 __vt.len(),
289 <AssetReference as ::unity::ClassIdentity>::NAME,
290 "ToString",
291 )
292 });
293 let __inner: extern "C" fn(AssetReference, ::unity::OptionalMethod) -> ::unity::Il2CppString =
294 ::core::mem::transmute(__vi.method_ptr);
295 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
296 __inner(__receiver, __mi)
297 }
298 }
299 }
300 fn load_asset<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
301 self,
302 ) -> crate::unity_engine::resource_management::async_operations::asyncoperationhandle_1::AsyncOperationHandle_1<M0> {
303 static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> =
304 ::std::sync::LazyLock::new(|| ::unity::lookup::method_info_on_class(<AssetReference as ::unity::ClassIdentity>::class(), "LoadAsset", 0));
305 #[allow(clippy::type_complexity)]
306 static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
307 ::std::sync::OnceLock::new();
308 let _ = false;
309 let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
310 ::core::result::Result::Ok(mi) => *mi,
311 ::core::result::Result::Err(e) => {
312 panic!(
313 "method lookup failed: {}
314::{}
315: {}
316",
317 <AssetReference as ::unity::ClassIdentity>::NAME,
318 "LoadAsset",
319 e
320 )
321 },
322 };
323 let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
324 let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
325 let __inflated: &'static ::unity::il2cpp::MethodInfo = {
326 let mut __guard = __cache.lock().unwrap();
327 *__guard
328 .entry(__key)
329 .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
330 };
331 unsafe {
332 let __receiver = <AssetReference as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
333 let __f: extern "C" fn(
334 AssetReference,
335 ::unity::OptionalMethod,
336 )
337 -> crate::unity_engine::resource_management::async_operations::asyncoperationhandle_1::AsyncOperationHandle_1<M0> =
338 ::core::mem::transmute(__inflated.method_ptr);
339 let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
340 __f(__receiver, ::core::option::Option::Some(__mi_opaque))
341 }
342 }
343 #[doc = "`LoadScene()` overload"]
344 fn load_scene(
345 self,
346 ) -> crate::unity_engine::resource_management::async_operations::asyncoperationhandle_1::AsyncOperationHandle_1<
347 crate::unity_engine::resource_management::resource_providers::sceneinstance::SceneInstance,
348 > {
349 unsafe {
350 let __receiver = <AssetReference as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
351 ::unity::il2cpp_call!((::unity::module_base()+0x2db26b0usize)as*mut u8,crate::unity_engine::resource_management::async_operations::asyncoperationhandle_1::AsyncOperationHandle_1<crate::unity_engine::resource_management::resource_providers::sceneinstance::SceneInstance> ;
352(AssetReference)__receiver)
353 }
354 }
355 #[doc = "`Instantiate(crate::unity_engine::vector3::Vector3, crate::unity_engine::quaternion::Quaternion, crate::unity_engine::transform::Transform)` overload"]
356 fn instantiate(
357 self,
358 position: impl ::core::convert::Into<crate::unity_engine::vector3::Vector3>,
359 rotation: impl ::core::convert::Into<crate::unity_engine::quaternion::Quaternion>,
360 parent: impl ::core::convert::Into<crate::unity_engine::transform::Transform>,
361 ) -> crate::unity_engine::resource_management::async_operations::asyncoperationhandle_1::AsyncOperationHandle_1<
362 crate::unity_engine::gameobject::GameObject,
363 > {
364 unsafe {
365 let __receiver = <AssetReference as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
366 ::unity::il2cpp_call!((::unity::module_base()+0x2db2710usize)as*mut u8,crate::unity_engine::resource_management::async_operations::asyncoperationhandle_1::AsyncOperationHandle_1<crate::unity_engine::gameobject::GameObject> ;
367(AssetReference)__receiver,(crate::unity_engine::vector3::Vector3)::core::convert::Into::into(position),(crate::unity_engine::quaternion::Quaternion)::core::convert::Into::into(rotation),(crate::unity_engine::transform::Transform)::core::convert::Into::into(parent))
368 }
369 }
370 #[doc = "`Instantiate(crate::unity_engine::transform::Transform, bool)` overload"]
371 fn instantiate_2(
372 self,
373 parent: impl ::core::convert::Into<crate::unity_engine::transform::Transform>,
374 instantiate_in_world_space: impl ::core::convert::Into<bool>,
375 ) -> crate::unity_engine::resource_management::async_operations::asyncoperationhandle_1::AsyncOperationHandle_1<
376 crate::unity_engine::gameobject::GameObject,
377 > {
378 unsafe {
379 let __receiver = <AssetReference as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
380 ::unity::il2cpp_call!((::unity::module_base()+0x2db2760usize)as*mut u8,crate::unity_engine::resource_management::async_operations::asyncoperationhandle_1::AsyncOperationHandle_1<crate::unity_engine::gameobject::GameObject> ;
381(AssetReference)__receiver,(crate::unity_engine::transform::Transform)::core::convert::Into::into(parent),(bool)::core::convert::Into::into(instantiate_in_world_space))
382 }
383 }
384 fn load_asset_async<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
385 self,
386 ) -> crate::unity_engine::resource_management::async_operations::asyncoperationhandle_1::AsyncOperationHandle_1<M0> {
387 static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
388 ::unity::lookup::method_info_on_class(<AssetReference as ::unity::ClassIdentity>::class(), "LoadAssetAsync", 0)
389 });
390 #[allow(clippy::type_complexity)]
391 static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
392 ::std::sync::OnceLock::new();
393 let _ = false;
394 let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
395 ::core::result::Result::Ok(mi) => *mi,
396 ::core::result::Result::Err(e) => {
397 panic!(
398 "method lookup failed: {}
399::{}
400: {}
401",
402 <AssetReference as ::unity::ClassIdentity>::NAME,
403 "LoadAssetAsync",
404 e
405 )
406 },
407 };
408 let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
409 let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
410 let __inflated: &'static ::unity::il2cpp::MethodInfo = {
411 let mut __guard = __cache.lock().unwrap();
412 *__guard
413 .entry(__key)
414 .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
415 };
416 unsafe {
417 let __receiver = <AssetReference as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
418 let __f: extern "C" fn(
419 AssetReference,
420 ::unity::OptionalMethod,
421 )
422 -> crate::unity_engine::resource_management::async_operations::asyncoperationhandle_1::AsyncOperationHandle_1<M0> =
423 ::core::mem::transmute(__inflated.method_ptr);
424 let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
425 __f(__receiver, ::core::option::Option::Some(__mi_opaque))
426 }
427 }
428 #[doc = "`LoadSceneAsync(crate::unity_engine::scene_management::loadscenemode::LoadSceneMode, bool, i32)` overload"]
429 fn load_scene_async(
430 self,
431 load_mode: impl ::core::convert::Into<crate::unity_engine::scene_management::loadscenemode::LoadSceneMode>,
432 activate_on_load: impl ::core::convert::Into<bool>,
433 priority: impl ::core::convert::Into<i32>,
434 ) -> crate::unity_engine::resource_management::async_operations::asyncoperationhandle_1::AsyncOperationHandle_1<
435 crate::unity_engine::resource_management::resource_providers::sceneinstance::SceneInstance,
436 > {
437 unsafe {
438 let __receiver = <AssetReference as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
439 {
440 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
441 let __vi = *__vt.get(13usize).unwrap_or_else(|| {
442 panic!(
443 "unity: virtual slot {}
444 out of range (vtable len {}
445) on the runtime class behind {}
446 (method `{}
447`)",
448 13usize,
449 __vt.len(),
450 <AssetReference as ::unity::ClassIdentity>::NAME,
451 "LoadSceneAsync",
452 )
453 });
454 let __inner:extern "C" fn(AssetReference,crate::unity_engine::scene_management::loadscenemode::LoadSceneMode,bool,i32, ::unity::OptionalMethod,)->crate::unity_engine::resource_management::async_operations::asyncoperationhandle_1::AsyncOperationHandle_1<crate::unity_engine::resource_management::resource_providers::sceneinstance::SceneInstance> = ::core::mem::transmute(__vi.method_ptr);
455 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
456 __inner(
457 __receiver,
458 ::core::convert::Into::into(load_mode),
459 ::core::convert::Into::into(activate_on_load),
460 ::core::convert::Into::into(priority),
461 __mi,
462 )
463 }
464 }
465 }
466 #[doc = "`UnLoadScene()` overload"]
467 fn un_load_scene(
468 self,
469 ) -> crate::unity_engine::resource_management::async_operations::asyncoperationhandle_1::AsyncOperationHandle_1<
470 crate::unity_engine::resource_management::resource_providers::sceneinstance::SceneInstance,
471 > {
472 unsafe {
473 let __receiver = <AssetReference as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
474 {
475 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
476 let __vi = *__vt.get(14usize).unwrap_or_else(|| {
477 panic!(
478 "unity: virtual slot {}
479 out of range (vtable len {}
480) on the runtime class behind {}
481 (method `{}
482`)",
483 14usize,
484 __vt.len(),
485 <AssetReference as ::unity::ClassIdentity>::NAME,
486 "UnLoadScene",
487 )
488 });
489 let __inner:extern "C" fn(AssetReference, ::unity::OptionalMethod,)->crate::unity_engine::resource_management::async_operations::asyncoperationhandle_1::AsyncOperationHandle_1<crate::unity_engine::resource_management::resource_providers::sceneinstance::SceneInstance> = ::core::mem::transmute(__vi.method_ptr);
490 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
491 __inner(__receiver, __mi)
492 }
493 }
494 }
495 #[doc = "`InstantiateAsync(crate::unity_engine::vector3::Vector3, crate::unity_engine::quaternion::Quaternion, crate::unity_engine::transform::Transform)` overload"]
496 fn instantiate_async(
497 self,
498 position: impl ::core::convert::Into<crate::unity_engine::vector3::Vector3>,
499 rotation: impl ::core::convert::Into<crate::unity_engine::quaternion::Quaternion>,
500 parent: impl ::core::convert::Into<crate::unity_engine::transform::Transform>,
501 ) -> crate::unity_engine::resource_management::async_operations::asyncoperationhandle_1::AsyncOperationHandle_1<
502 crate::unity_engine::gameobject::GameObject,
503 > {
504 unsafe {
505 let __receiver = <AssetReference as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
506 {
507 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
508 let __vi = *__vt.get(15usize).unwrap_or_else(|| {
509 panic!(
510 "unity: virtual slot {}
511 out of range (vtable len {}
512) on the runtime class behind {}
513 (method `{}
514`)",
515 15usize,
516 __vt.len(),
517 <AssetReference as ::unity::ClassIdentity>::NAME,
518 "InstantiateAsync",
519 )
520 });
521 let __inner:extern "C" fn(AssetReference,crate::unity_engine::vector3::Vector3,crate::unity_engine::quaternion::Quaternion,crate::unity_engine::transform::Transform, ::unity::OptionalMethod,)->crate::unity_engine::resource_management::async_operations::asyncoperationhandle_1::AsyncOperationHandle_1<crate::unity_engine::gameobject::GameObject> = ::core::mem::transmute(__vi.method_ptr);
522 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
523 __inner(
524 __receiver,
525 ::core::convert::Into::into(position),
526 ::core::convert::Into::into(rotation),
527 ::core::convert::Into::into(parent),
528 __mi,
529 )
530 }
531 }
532 }
533 #[doc = "`InstantiateAsync(crate::unity_engine::transform::Transform, bool)` overload"]
534 fn instantiate_async_2(
535 self,
536 parent: impl ::core::convert::Into<crate::unity_engine::transform::Transform>,
537 instantiate_in_world_space: impl ::core::convert::Into<bool>,
538 ) -> crate::unity_engine::resource_management::async_operations::asyncoperationhandle_1::AsyncOperationHandle_1<
539 crate::unity_engine::gameobject::GameObject,
540 > {
541 unsafe {
542 let __receiver = <AssetReference as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
543 {
544 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
545 let __vi = *__vt.get(16usize).unwrap_or_else(|| {
546 panic!(
547 "unity: virtual slot {}
548 out of range (vtable len {}
549) on the runtime class behind {}
550 (method `{}
551`)",
552 16usize,
553 __vt.len(),
554 <AssetReference as ::unity::ClassIdentity>::NAME,
555 "InstantiateAsync",
556 )
557 });
558 let __inner:extern "C" fn(AssetReference,crate::unity_engine::transform::Transform,bool, ::unity::OptionalMethod,)->crate::unity_engine::resource_management::async_operations::asyncoperationhandle_1::AsyncOperationHandle_1<crate::unity_engine::gameobject::GameObject> = ::core::mem::transmute(__vi.method_ptr);
559 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
560 __inner(
561 __receiver,
562 ::core::convert::Into::into(parent),
563 ::core::convert::Into::into(instantiate_in_world_space),
564 __mi,
565 )
566 }
567 }
568 }
569 #[doc = "`RuntimeKeyIsValid()` overload"]
570 fn runtime_key_is_valid(self) -> bool {
571 unsafe {
572 let __receiver = <AssetReference as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
573 {
574 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
575 let __vi = *__vt.get(17usize).unwrap_or_else(|| {
576 panic!(
577 "unity: virtual slot {}
578 out of range (vtable len {}
579) on the runtime class behind {}
580 (method `{}
581`)",
582 17usize,
583 __vt.len(),
584 <AssetReference as ::unity::ClassIdentity>::NAME,
585 "RuntimeKeyIsValid",
586 )
587 });
588 let __inner: extern "C" fn(AssetReference, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
589 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
590 __inner(__receiver, __mi)
591 }
592 }
593 }
594 #[doc = "`ReleaseAsset()` overload"]
595 fn release_asset(self) -> () {
596 unsafe {
597 let __receiver = <AssetReference as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
598 {
599 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
600 let __vi = *__vt.get(18usize).unwrap_or_else(|| {
601 panic!(
602 "unity: virtual slot {}
603 out of range (vtable len {}
604) on the runtime class behind {}
605 (method `{}
606`)",
607 18usize,
608 __vt.len(),
609 <AssetReference as ::unity::ClassIdentity>::NAME,
610 "ReleaseAsset",
611 )
612 });
613 let __inner: extern "C" fn(AssetReference, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
614 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
615 __inner(__receiver, __mi)
616 }
617 }
618 }
619 #[doc = "`ReleaseInstance(crate::unity_engine::gameobject::GameObject)` overload"]
620 fn release_instance(self, obj: impl ::core::convert::Into<crate::unity_engine::gameobject::GameObject>) -> () {
621 unsafe {
622 let __receiver = <AssetReference as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
623 {
624 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
625 let __vi = *__vt.get(19usize).unwrap_or_else(|| {
626 panic!(
627 "unity: virtual slot {}
628 out of range (vtable len {}
629) on the runtime class behind {}
630 (method `{}
631`)",
632 19usize,
633 __vt.len(),
634 <AssetReference as ::unity::ClassIdentity>::NAME,
635 "ReleaseInstance",
636 )
637 });
638 let __inner: extern "C" fn(AssetReference, crate::unity_engine::gameobject::GameObject, ::unity::OptionalMethod) -> () =
639 ::core::mem::transmute(__vi.method_ptr);
640 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
641 __inner(__receiver, ::core::convert::Into::into(obj), __mi)
642 }
643 }
644 }
645 #[doc = "`ValidateAsset(crate::unity_engine::object_2::Object_2)` overload"]
646 fn validate_asset(self, obj: impl ::core::convert::Into<crate::unity_engine::object_2::Object_2>) -> bool {
647 unsafe {
648 let __receiver = <AssetReference as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
649 {
650 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
651 let __vi = *__vt.get(20usize).unwrap_or_else(|| {
652 panic!(
653 "unity: virtual slot {}
654 out of range (vtable len {}
655) on the runtime class behind {}
656 (method `{}
657`)",
658 20usize,
659 __vt.len(),
660 <AssetReference as ::unity::ClassIdentity>::NAME,
661 "ValidateAsset",
662 )
663 });
664 let __inner: extern "C" fn(AssetReference, crate::unity_engine::object_2::Object_2, ::unity::OptionalMethod) -> bool =
665 ::core::mem::transmute(__vi.method_ptr);
666 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
667 __inner(__receiver, ::core::convert::Into::into(obj), __mi)
668 }
669 }
670 }
671 #[doc = "`ValidateAsset(::unity::Il2CppString)` overload"]
672 fn validate_asset_2(self, path: impl ::core::convert::Into<::unity::Il2CppString>) -> bool {
673 unsafe {
674 let __receiver = <AssetReference as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
675 {
676 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
677 let __vi = *__vt.get(21usize).unwrap_or_else(|| {
678 panic!(
679 "unity: virtual slot {}
680 out of range (vtable len {}
681) on the runtime class behind {}
682 (method `{}
683`)",
684 21usize,
685 __vt.len(),
686 <AssetReference as ::unity::ClassIdentity>::NAME,
687 "ValidateAsset",
688 )
689 });
690 let __inner: extern "C" fn(AssetReference, ::unity::Il2CppString, ::unity::OptionalMethod) -> bool =
691 ::core::mem::transmute(__vi.method_ptr);
692 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
693 __inner(__receiver, ::core::convert::Into::into(path), __mi)
694 }
695 }
696 }
697}
698
699#[cfg(feature = "unity_engine-addressable_assets-assetreference")]
700impl<__T: IAssetReference> IAssetReferenceMethods for __T {}
701
702#[cfg(feature = "unity_engine-addressable_assets-assetreference")]
703impl AssetReference {
704 pub fn get_operation_handle_method_info() -> &'static ::unity::il2cpp::MethodInfo {
705 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
706 }
707
708 pub fn get_runtime_key_method_info() -> &'static ::unity::il2cpp::MethodInfo {
709 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
710 }
711
712 pub fn get_asset_guid_method_info() -> &'static ::unity::il2cpp::MethodInfo {
713 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
714 }
715
716 pub fn get_sub_object_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
717 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
718 }
719
720 pub fn set_sub_object_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
721 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
722 }
723
724 pub fn get_sub_ojbect_type_method_info() -> &'static ::unity::il2cpp::MethodInfo {
725 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
726 }
727
728 pub fn is_valid_method_info() -> &'static ::unity::il2cpp::MethodInfo {
729 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
730 }
731
732 pub fn get_is_done_method_info() -> &'static ::unity::il2cpp::MethodInfo {
733 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
734 }
735
736 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
737 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
738 }
739
740 pub fn ctor_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
741 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
742 }
743
744 pub fn get_asset_method_info() -> &'static ::unity::il2cpp::MethodInfo {
745 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
746 }
747
748 pub fn to_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
749 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
750 }
751
752 pub fn load_scene_method_info() -> &'static ::unity::il2cpp::MethodInfo {
753 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
754 }
755
756 pub fn instantiate_method_info() -> &'static ::unity::il2cpp::MethodInfo {
757 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
758 }
759
760 pub fn instantiate_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
761 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
762 }
763
764 pub fn load_scene_async_method_info() -> &'static ::unity::il2cpp::MethodInfo {
765 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[18]
766 }
767
768 pub fn un_load_scene_method_info() -> &'static ::unity::il2cpp::MethodInfo {
769 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[19]
770 }
771
772 pub fn instantiate_async_method_info() -> &'static ::unity::il2cpp::MethodInfo {
773 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[20]
774 }
775
776 pub fn instantiate_async_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
777 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[21]
778 }
779
780 pub fn runtime_key_is_valid_method_info() -> &'static ::unity::il2cpp::MethodInfo {
781 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[22]
782 }
783
784 pub fn release_asset_method_info() -> &'static ::unity::il2cpp::MethodInfo {
785 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[23]
786 }
787
788 pub fn release_instance_method_info() -> &'static ::unity::il2cpp::MethodInfo {
789 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[24]
790 }
791
792 pub fn validate_asset_method_info() -> &'static ::unity::il2cpp::MethodInfo {
793 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[25]
794 }
795
796 pub fn validate_asset_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
797 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[26]
798 }
799}
800
801#[cfg(feature = "unity_engine-addressable_assets-assetreference")]
802impl AssetReference {
803 #[doc = "Direct (non-virtual) call to `AssetReference`'s own `get_RuntimeKey`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
804 pub unsafe fn get_runtime_key(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::system::object::Object {
805 let __mi = Self::get_runtime_key_method_info();
806 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::system::object::Object =
807 ::core::mem::transmute(__mi.method_ptr);
808 __inner(this.into(), ::core::option::Option::None)
809 }
810
811 #[doc = "Direct (non-virtual) call to `AssetReference`'s own `get_AssetGUID`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
812 pub unsafe fn get_asset_guid(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
813 let __mi = Self::get_asset_guid_method_info();
814 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
815 __inner(this.into(), ::core::option::Option::None)
816 }
817
818 #[doc = "Direct (non-virtual) call to `AssetReference`'s own `get_SubObjectName`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
819 pub unsafe fn get_sub_object_name(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
820 let __mi = Self::get_sub_object_name_method_info();
821 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
822 __inner(this.into(), ::core::option::Option::None)
823 }
824
825 #[doc = "Direct (non-virtual) call to `AssetReference`'s own `set_SubObjectName`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
826 pub unsafe fn set_sub_object_name(this: impl ::core::convert::Into<::unity::IlInstance>, value: ::unity::Il2CppString) -> () {
827 let __mi = Self::set_sub_object_name_method_info();
828 let __inner: extern "C" fn(::unity::IlInstance, ::unity::Il2CppString, ::unity::OptionalMethod) -> () =
829 ::core::mem::transmute(__mi.method_ptr);
830 __inner(this.into(), value, ::core::option::Option::None)
831 }
832
833 #[doc = "Direct (non-virtual) call to `AssetReference`'s own `get_SubOjbectType`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
834 pub unsafe fn get_sub_ojbect_type(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::SystemType {
835 let __mi = Self::get_sub_ojbect_type_method_info();
836 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::SystemType = ::core::mem::transmute(__mi.method_ptr);
837 __inner(this.into(), ::core::option::Option::None)
838 }
839
840 #[doc = "Direct (non-virtual) call to `AssetReference`'s own `get_Asset`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
841 pub unsafe fn get_asset(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::unity_engine::object_2::Object_2 {
842 let __mi = Self::get_asset_method_info();
843 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::unity_engine::object_2::Object_2 =
844 ::core::mem::transmute(__mi.method_ptr);
845 __inner(this.into(), ::core::option::Option::None)
846 }
847
848 #[doc = "Direct (non-virtual) call to `AssetReference`'s own `ToString`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
849 pub unsafe fn to_string(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
850 let __mi = Self::to_string_method_info();
851 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
852 __inner(this.into(), ::core::option::Option::None)
853 }
854
855 #[doc = "Direct (non-virtual) call to `AssetReference`'s own `LoadSceneAsync`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
856 pub unsafe fn load_scene_async(
857 this: impl ::core::convert::Into<::unity::IlInstance>,
858 load_mode: crate::unity_engine::scene_management::loadscenemode::LoadSceneMode,
859 activate_on_load: bool,
860 priority: i32,
861 ) -> crate::unity_engine::resource_management::async_operations::asyncoperationhandle_1::AsyncOperationHandle_1<
862 crate::unity_engine::resource_management::resource_providers::sceneinstance::SceneInstance,
863 > {
864 let __mi = Self::load_scene_async_method_info();
865 let __inner: extern "C" fn(
866 ::unity::IlInstance,
867 crate::unity_engine::scene_management::loadscenemode::LoadSceneMode,
868 bool,
869 i32,
870 ::unity::OptionalMethod,
871 )
872 -> crate::unity_engine::resource_management::async_operations::asyncoperationhandle_1::AsyncOperationHandle_1<
873 crate::unity_engine::resource_management::resource_providers::sceneinstance::SceneInstance,
874 > = ::core::mem::transmute(__mi.method_ptr);
875 __inner(this.into(), load_mode, activate_on_load, priority, ::core::option::Option::None)
876 }
877
878 #[doc = "Direct (non-virtual) call to `AssetReference`'s own `UnLoadScene`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
879 pub unsafe fn un_load_scene(
880 this: impl ::core::convert::Into<::unity::IlInstance>,
881 ) -> crate::unity_engine::resource_management::async_operations::asyncoperationhandle_1::AsyncOperationHandle_1<
882 crate::unity_engine::resource_management::resource_providers::sceneinstance::SceneInstance,
883 > {
884 let __mi = Self::un_load_scene_method_info();
885 let __inner: extern "C" fn(
886 ::unity::IlInstance,
887 ::unity::OptionalMethod,
888 )
889 -> crate::unity_engine::resource_management::async_operations::asyncoperationhandle_1::AsyncOperationHandle_1<
890 crate::unity_engine::resource_management::resource_providers::sceneinstance::SceneInstance,
891 > = ::core::mem::transmute(__mi.method_ptr);
892 __inner(this.into(), ::core::option::Option::None)
893 }
894
895 #[doc = "Direct (non-virtual) call to `AssetReference`'s own `InstantiateAsync`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
896 pub unsafe fn instantiate_async(
897 this: impl ::core::convert::Into<::unity::IlInstance>,
898 position: crate::unity_engine::vector3::Vector3,
899 rotation: crate::unity_engine::quaternion::Quaternion,
900 parent: crate::unity_engine::transform::Transform,
901 ) -> crate::unity_engine::resource_management::async_operations::asyncoperationhandle_1::AsyncOperationHandle_1<
902 crate::unity_engine::gameobject::GameObject,
903 > {
904 let __mi = Self::instantiate_async_method_info();
905 let __inner: extern "C" fn(
906 ::unity::IlInstance,
907 crate::unity_engine::vector3::Vector3,
908 crate::unity_engine::quaternion::Quaternion,
909 crate::unity_engine::transform::Transform,
910 ::unity::OptionalMethod,
911 )
912 -> crate::unity_engine::resource_management::async_operations::asyncoperationhandle_1::AsyncOperationHandle_1<
913 crate::unity_engine::gameobject::GameObject,
914 > = ::core::mem::transmute(__mi.method_ptr);
915 __inner(this.into(), position, rotation, parent, ::core::option::Option::None)
916 }
917
918 #[doc = "Direct (non-virtual) call to `AssetReference`'s own `InstantiateAsync`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
919 pub unsafe fn instantiate_async_2(
920 this: impl ::core::convert::Into<::unity::IlInstance>,
921 parent: crate::unity_engine::transform::Transform,
922 instantiate_in_world_space: bool,
923 ) -> crate::unity_engine::resource_management::async_operations::asyncoperationhandle_1::AsyncOperationHandle_1<
924 crate::unity_engine::gameobject::GameObject,
925 > {
926 let __mi = Self::instantiate_async_2_method_info();
927 let __inner: extern "C" fn(
928 ::unity::IlInstance,
929 crate::unity_engine::transform::Transform,
930 bool,
931 ::unity::OptionalMethod,
932 )
933 -> crate::unity_engine::resource_management::async_operations::asyncoperationhandle_1::AsyncOperationHandle_1<
934 crate::unity_engine::gameobject::GameObject,
935 > = ::core::mem::transmute(__mi.method_ptr);
936 __inner(this.into(), parent, instantiate_in_world_space, ::core::option::Option::None)
937 }
938
939 #[doc = "Direct (non-virtual) call to `AssetReference`'s own `RuntimeKeyIsValid`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
940 pub unsafe fn runtime_key_is_valid(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
941 let __mi = Self::runtime_key_is_valid_method_info();
942 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
943 __inner(this.into(), ::core::option::Option::None)
944 }
945
946 #[doc = "Direct (non-virtual) call to `AssetReference`'s own `ReleaseAsset`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
947 pub unsafe fn release_asset(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
948 let __mi = Self::release_asset_method_info();
949 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
950 __inner(this.into(), ::core::option::Option::None)
951 }
952
953 #[doc = "Direct (non-virtual) call to `AssetReference`'s own `ReleaseInstance`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
954 pub unsafe fn release_instance(this: impl ::core::convert::Into<::unity::IlInstance>, obj: crate::unity_engine::gameobject::GameObject) -> () {
955 let __mi = Self::release_instance_method_info();
956 let __inner: extern "C" fn(::unity::IlInstance, crate::unity_engine::gameobject::GameObject, ::unity::OptionalMethod) -> () =
957 ::core::mem::transmute(__mi.method_ptr);
958 __inner(this.into(), obj, ::core::option::Option::None)
959 }
960
961 #[doc = "Direct (non-virtual) call to `AssetReference`'s own `ValidateAsset`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
962 pub unsafe fn validate_asset(this: impl ::core::convert::Into<::unity::IlInstance>, obj: crate::unity_engine::object_2::Object_2) -> bool {
963 let __mi = Self::validate_asset_method_info();
964 let __inner: extern "C" fn(::unity::IlInstance, crate::unity_engine::object_2::Object_2, ::unity::OptionalMethod) -> bool =
965 ::core::mem::transmute(__mi.method_ptr);
966 __inner(this.into(), obj, ::core::option::Option::None)
967 }
968
969 #[doc = "Direct (non-virtual) call to `AssetReference`'s own `ValidateAsset`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
970 pub unsafe fn validate_asset_2(this: impl ::core::convert::Into<::unity::IlInstance>, path: ::unity::Il2CppString) -> bool {
971 let __mi = Self::validate_asset_2_method_info();
972 let __inner: extern "C" fn(::unity::IlInstance, ::unity::Il2CppString, ::unity::OptionalMethod) -> bool =
973 ::core::mem::transmute(__mi.method_ptr);
974 __inner(this.into(), path, ::core::option::Option::None)
975 }
976}
977
978#[cfg(feature = "unity_engine-addressable_assets-assetreference")]
979impl AssetReference {
980 #[doc = "`.ctor()` — no args"]
981 pub fn new() -> Self {
982 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
983 panic!(
984 "{}
985::{}
986 failed to instantiate",
987 ::core::stringify!(AssetReference),
988 ::core::stringify!(new),
989 )
990 });
991 <Self as IAssetReferenceMethods>::ctor(this);
992 this
993 }
994
995 #[doc = "`.ctor(::unity::Il2CppString)` — overload selector"]
996 pub fn new_2(guid: ::unity::Il2CppString) -> Self {
997 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
998 panic!(
999 "{}
1000::{}
1001 failed to instantiate",
1002 ::core::stringify!(AssetReference),
1003 ::core::stringify!(new_2),
1004 )
1005 });
1006 <Self as IAssetReferenceMethods>::ctor_2(this, guid);
1007 this
1008 }
1009}
1010
1011#[cfg(feature = "unity_engine-addressable_assets-assetreference")]
1012#[doc(hidden)]
1013pub mod prelude {
1014 pub use super::{AssetReference, IAssetReference, IAssetReferenceMethods};
1015 pub use crate::system::object::IObject;
1016 #[cfg(feature = "system-object")]
1017 pub use crate::system::object::IObjectMethods;
1018}