engage/generated/combat/
resourcecache.rs1#[cfg(feature = "combat-resourcecache-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 app::singletonmonobehaviour_1::{ISingletonMonoBehaviour_1, SingletonMonoBehaviour_1},
10 system::object::{IObject, Object},
11 unity_engine::{
12 behaviour::{Behaviour, IBehaviour},
13 component::{Component, IComponent},
14 monobehaviour::{IMonoBehaviour, MonoBehaviour},
15 object_2::{IObject_2, Object_2},
16 },
17 };
18
19 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/combat/resourcecache/ResourceCache.md"))]
20 #[::unity::class(namespace = "Combat", name = "ResourceCache")]
21 #[parent(crate::app::singletonmonobehaviour_1::SingletonMonoBehaviour_1<crate::combat::resourcecache::ResourceCache>)]
22 pub struct ResourceCache {
23 #[offset(32)]
24 #[rename(name = "dic")]
25 pub dic:
26 crate::system::collections::generic::dictionary_2::Dictionary_2<::unity::Il2CppString, crate::app::resourcehandle_2::ResourceHandle_2>,
27 }
28}
29
30#[cfg(feature = "combat-resourcecache-types")]
31pub use __types::*;
32
33#[cfg(feature = "combat-resourcecache")]
34impl ResourceCache {
35 #[doc = "`LoadAsync(::unity::Il2CppString, crate::system::action_1::Action_1<crate::unity_engine::object_2::Object_2>)` overload"]
36 pub fn load_async(
37 asset_path: impl ::core::convert::Into<::unity::Il2CppString>,
38 done_callback: impl ::core::convert::Into<crate::system::action_1::Action_1<crate::unity_engine::object_2::Object_2>>,
39 ) -> () {
40 unsafe {
41 ::unity::il2cpp_call!((::unity::module_base()+0x2013890usize)as*mut u8,();
42(::unity::Il2CppString)::core::convert::Into::into(asset_path),(crate::system::action_1::Action_1<crate::unity_engine::object_2::Object_2>)::core::convert::Into::into(done_callback))
43 }
44 }
45}
46
47#[cfg(feature = "combat-resourcecache")]
48pub trait IResourceCacheMethods: IResourceCache {
49 #[doc = "`Awake()` overload"]
50 fn awake(self) -> () {
51 unsafe {
52 let __receiver = <ResourceCache as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
53 {
54 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
55 let __vi = *__vt.get(4usize).unwrap_or_else(|| {
56 panic!(
57 "unity: virtual slot {}
58 out of range (vtable len {}
59) on the runtime class behind {}
60 (method `{}
61`)",
62 4usize,
63 __vt.len(),
64 <ResourceCache as ::unity::ClassIdentity>::NAME,
65 "Awake",
66 )
67 });
68 let __inner: extern "C" fn(ResourceCache, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
69 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
70 __inner(__receiver, __mi)
71 }
72 }
73 }
74 #[doc = "`OnDestroy()` overload"]
75 fn on_destroy(self) -> () {
76 unsafe {
77 let __receiver = <ResourceCache as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
78 ::unity::il2cpp_call!((::unity::module_base()+0x2013570usize)as*mut u8,();
79(ResourceCache)__receiver)
80 }
81 }
82 #[doc = "`Create(::unity::Il2CppString)` overload"]
83 fn create(self, asset_path: impl ::core::convert::Into<::unity::Il2CppString>) -> crate::app::resourcehandle_2::ResourceHandle_2 {
84 unsafe {
85 let __receiver = <ResourceCache as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
86 ::unity::il2cpp_call!((::unity::module_base()+0x2013700usize)as*mut u8,crate::app::resourcehandle_2::ResourceHandle_2;
87(ResourceCache)__receiver,(::unity::Il2CppString)::core::convert::Into::into(asset_path))
88 }
89 }
90 #[doc = "`.ctor()` overload"]
91 fn ctor(self) -> () {
92 unsafe {
93 let __receiver = <ResourceCache as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
94 ::unity::il2cpp_call!((::unity::module_base()+0x2013a60usize)as*mut u8,();
95(ResourceCache)__receiver)
96 }
97 }
98}
99
100#[cfg(feature = "combat-resourcecache")]
101impl<__T: IResourceCache> IResourceCacheMethods for __T {}
102
103#[cfg(feature = "combat-resourcecache")]
104impl ResourceCache {
105 pub fn awake_method_info() -> &'static ::unity::il2cpp::MethodInfo {
106 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
107 }
108
109 pub fn on_destroy_method_info() -> &'static ::unity::il2cpp::MethodInfo {
110 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
111 }
112
113 pub fn create_method_info() -> &'static ::unity::il2cpp::MethodInfo {
114 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
115 }
116
117 pub fn load_async_method_info() -> &'static ::unity::il2cpp::MethodInfo {
118 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
119 }
120
121 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
122 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
123 }
124}
125
126#[cfg(feature = "combat-resourcecache")]
127impl ResourceCache {
128 #[doc = "Direct (non-virtual) call to `ResourceCache`'s own `Awake`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
129 pub unsafe fn awake(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
130 let __mi = Self::awake_method_info();
131 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
132 __inner(this.into(), ::core::option::Option::None)
133 }
134}
135
136#[cfg(feature = "combat-resourcecache")]
137impl ResourceCache {
138 #[doc = "`.ctor()` — no args"]
139 pub fn new() -> Self {
140 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
141 panic!(
142 "{}
143::{}
144 failed to instantiate",
145 ::core::stringify!(ResourceCache),
146 ::core::stringify!(new),
147 )
148 });
149 <Self as IResourceCacheMethods>::ctor(this);
150 this
151 }
152}
153
154#[cfg(feature = "combat-resourcecache")]
155#[doc(hidden)]
156pub mod prelude {
157 pub use super::{IResourceCache, IResourceCacheMethods, ResourceCache};
158 #[cfg(feature = "app-singletonmonobehaviour_1")]
159 pub use crate::app::singletonmonobehaviour_1::ISingletonMonoBehaviour_1Methods;
160 #[cfg(feature = "system-object")]
161 pub use crate::system::object::IObjectMethods;
162 #[cfg(feature = "unity_engine-behaviour")]
163 pub use crate::unity_engine::behaviour::IBehaviourMethods;
164 #[cfg(feature = "unity_engine-component")]
165 pub use crate::unity_engine::component::IComponentMethods;
166 #[cfg(feature = "unity_engine-monobehaviour")]
167 pub use crate::unity_engine::monobehaviour::IMonoBehaviourMethods;
168 #[cfg(feature = "unity_engine-object_2")]
169 pub use crate::unity_engine::object_2::IObject_2Methods;
170 pub use crate::{
171 app::singletonmonobehaviour_1::ISingletonMonoBehaviour_1,
172 system::object::IObject,
173 unity_engine::{behaviour::IBehaviour, component::IComponent, monobehaviour::IMonoBehaviour, object_2::IObject_2},
174 };
175}