Skip to main content

engage/generated/unity_engine/events/
argumentcache.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-events-argumentcache-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/events/argumentcache/ArgumentCache.md"))]
11    #[::unity::class(namespace = "UnityEngine.Events", name = "ArgumentCache")]
12    #[parent(crate::system::object::Object)]
13    pub struct ArgumentCache {
14        #[offset(16)]
15        #[rename(name = "m_ObjectArgument")]
16        pub m_object_argument: crate::unity_engine::object_2::Object_2,
17        #[offset(24)]
18        #[rename(name = "m_ObjectArgumentAssemblyTypeName")]
19        pub m_object_argument_assembly_type_name: ::unity::Il2CppString,
20        #[offset(32)]
21        #[rename(name = "m_IntArgument")]
22        pub m_int_argument: i32,
23        #[offset(36)]
24        #[rename(name = "m_FloatArgument")]
25        pub m_float_argument: f32,
26        #[offset(40)]
27        #[rename(name = "m_StringArgument")]
28        pub m_string_argument: ::unity::Il2CppString,
29        #[offset(48)]
30        #[rename(name = "m_BoolArgument")]
31        pub m_bool_argument: bool,
32    }
33}
34
35#[cfg(feature = "unity_engine-events-argumentcache-types")]
36pub use __types::*;
37
38#[cfg(feature = "unity_engine-events-argumentcache")]
39pub trait IArgumentCacheMethods: IArgumentCache {
40    #[doc = "`get_unityObjectArgument()` overload"]
41    fn get_unity_object_argument(self) -> crate::unity_engine::object_2::Object_2 {
42        unsafe {
43            let __receiver = <ArgumentCache as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
44            ::unity::il2cpp_call!((::unity::module_base()+0x2c362c0usize)as*mut u8,crate::unity_engine::object_2::Object_2;
45(ArgumentCache)__receiver)
46        }
47    }
48    #[doc = "`get_unityObjectArgumentAssemblyTypeName()` overload"]
49    fn get_unity_object_argument_assembly_type_name(self) -> ::unity::Il2CppString {
50        unsafe {
51            let __receiver = <ArgumentCache as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
52            ::unity::il2cpp_call!((::unity::module_base()+0x2c362d0usize)as*mut u8, ::unity::Il2CppString;
53(ArgumentCache)__receiver)
54        }
55    }
56    #[doc = "`get_intArgument()` overload"]
57    fn get_int_argument(self) -> i32 {
58        unsafe {
59            let __receiver = <ArgumentCache as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
60            ::unity::il2cpp_call!((::unity::module_base()+0x2c362e0usize)as*mut u8,i32;
61(ArgumentCache)__receiver)
62        }
63    }
64    #[doc = "`get_floatArgument()` overload"]
65    fn get_float_argument(self) -> f32 {
66        unsafe {
67            let __receiver = <ArgumentCache as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
68            ::unity::il2cpp_call!((::unity::module_base()+0x2c362f0usize)as*mut u8,f32;
69(ArgumentCache)__receiver)
70        }
71    }
72    #[doc = "`get_stringArgument()` overload"]
73    fn get_string_argument(self) -> ::unity::Il2CppString {
74        unsafe {
75            let __receiver = <ArgumentCache as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
76            ::unity::il2cpp_call!((::unity::module_base()+0x2c36300usize)as*mut u8, ::unity::Il2CppString;
77(ArgumentCache)__receiver)
78        }
79    }
80    #[doc = "`get_boolArgument()` overload"]
81    fn get_bool_argument(self) -> bool {
82        unsafe {
83            let __receiver = <ArgumentCache as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
84            ::unity::il2cpp_call!((::unity::module_base()+0x2c36310usize)as*mut u8,bool;
85(ArgumentCache)__receiver)
86        }
87    }
88    #[doc = "`OnBeforeSerialize()` overload"]
89    fn on_before_serialize(self) -> () {
90        unsafe {
91            let __receiver = <ArgumentCache as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
92            {
93                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
94                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
95                    panic!(
96                        "unity: virtual slot {}
97 out of range (vtable len {}
98) on the runtime class behind {}
99 (method `{}
100`)",
101                        4usize,
102                        __vt.len(),
103                        <ArgumentCache as ::unity::ClassIdentity>::NAME,
104                        "OnBeforeSerialize",
105                    )
106                });
107                let __inner: extern "C" fn(ArgumentCache, ::unity::OptionalMethod) -> () = ::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 = "`OnAfterDeserialize()` overload"]
114    fn on_after_deserialize(self) -> () {
115        unsafe {
116            let __receiver = <ArgumentCache 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(5usize).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                        5usize,
127                        __vt.len(),
128                        <ArgumentCache as ::unity::ClassIdentity>::NAME,
129                        "OnAfterDeserialize",
130                    )
131                });
132                let __inner: extern "C" fn(ArgumentCache, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
133                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
134                __inner(__receiver, __mi)
135            }
136        }
137    }
138    #[doc = "`.ctor()` overload"]
139    fn ctor(self) -> () {
140        unsafe {
141            let __receiver = <ArgumentCache as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
142            ::unity::il2cpp_call!((::unity::module_base()+0x2c363a0usize)as*mut u8,();
143(ArgumentCache)__receiver)
144        }
145    }
146}
147
148#[cfg(feature = "unity_engine-events-argumentcache")]
149impl<__T: IArgumentCache> IArgumentCacheMethods for __T {}
150
151#[cfg(feature = "unity_engine-events-argumentcache")]
152impl ArgumentCache {
153    pub fn get_unity_object_argument_method_info() -> &'static ::unity::il2cpp::MethodInfo {
154        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
155    }
156
157    pub fn get_unity_object_argument_assembly_type_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
158        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
159    }
160
161    pub fn get_int_argument_method_info() -> &'static ::unity::il2cpp::MethodInfo {
162        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
163    }
164
165    pub fn get_float_argument_method_info() -> &'static ::unity::il2cpp::MethodInfo {
166        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
167    }
168
169    pub fn get_string_argument_method_info() -> &'static ::unity::il2cpp::MethodInfo {
170        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
171    }
172
173    pub fn get_bool_argument_method_info() -> &'static ::unity::il2cpp::MethodInfo {
174        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
175    }
176
177    pub fn on_before_serialize_method_info() -> &'static ::unity::il2cpp::MethodInfo {
178        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
179    }
180
181    pub fn on_after_deserialize_method_info() -> &'static ::unity::il2cpp::MethodInfo {
182        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
183    }
184
185    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
186        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
187    }
188}
189
190#[cfg(feature = "unity_engine-events-argumentcache")]
191impl ArgumentCache {
192    #[doc = "Direct (non-virtual) call to `ArgumentCache`'s own `OnBeforeSerialize`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
193    pub unsafe fn on_before_serialize(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
194        let __mi = Self::on_before_serialize_method_info();
195        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
196        __inner(this.into(), ::core::option::Option::None)
197    }
198
199    #[doc = "Direct (non-virtual) call to `ArgumentCache`'s own `OnAfterDeserialize`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
200    pub unsafe fn on_after_deserialize(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
201        let __mi = Self::on_after_deserialize_method_info();
202        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
203        __inner(this.into(), ::core::option::Option::None)
204    }
205}
206
207#[cfg(feature = "unity_engine-events-argumentcache")]
208impl ArgumentCache {
209    #[doc = "`.ctor()` — no args"]
210    pub fn new() -> Self {
211        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
212            panic!(
213                "{}
214::{}
215 failed to instantiate",
216                ::core::stringify!(ArgumentCache),
217                ::core::stringify!(new),
218            )
219        });
220        <Self as IArgumentCacheMethods>::ctor(this);
221        this
222    }
223}
224
225#[cfg(feature = "unity_engine-events-argumentcache")]
226#[doc(hidden)]
227pub mod prelude {
228    pub use super::{ArgumentCache, IArgumentCache, IArgumentCacheMethods};
229    pub use crate::system::object::IObject;
230    #[cfg(feature = "system-object")]
231    pub use crate::system::object::IObjectMethods;
232}