Skip to main content

engage/generated/unity_engine/
asyncoperation.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-asyncoperation-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::{
9        system::object::{IObject, Object},
10        unity_engine::yieldinstruction::{IYieldInstruction, YieldInstruction},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/asyncoperation/AsyncOperation.md"))]
14    #[::unity::class(namespace = "UnityEngine", name = "AsyncOperation")]
15    #[parent(crate::unity_engine::yieldinstruction::YieldInstruction)]
16    pub struct AsyncOperation {
17        #[offset(16)]
18        #[rename(name = "m_Ptr")]
19        pub m_ptr: ::unity::IntPtr,
20        #[offset(24)]
21        #[rename(name = "m_completeCallback")]
22        pub m_complete_callback: crate::system::action_1::Action_1<crate::unity_engine::asyncoperation::AsyncOperation>,
23    }
24}
25
26#[cfg(feature = "unity_engine-asyncoperation-types")]
27pub use __types::*;
28
29#[cfg(feature = "unity_engine-asyncoperation")]
30impl AsyncOperation {
31    #[doc = "`InternalDestroy(::unity::IntPtr)` overload"]
32    pub fn internal_destroy(ptr: impl ::core::convert::Into<::unity::IntPtr>) -> () {
33        unsafe {
34            ::unity::il2cpp_call!((::unity::module_base()+0x2c363b0usize)as*mut u8,();
35(::unity::IntPtr)::core::convert::Into::into(ptr))
36        }
37    }
38}
39
40#[cfg(feature = "unity_engine-asyncoperation")]
41pub trait IAsyncOperationMethods: IAsyncOperation {
42    #[doc = "`get_isDone()` overload"]
43    fn get_is_done(self) -> bool {
44        unsafe {
45            let __receiver = <AsyncOperation as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
46            ::unity::il2cpp_call!((::unity::module_base()+0x2c36400usize)as*mut u8,bool;
47(AsyncOperation)__receiver)
48        }
49    }
50    #[doc = "`get_progress()` overload"]
51    fn get_progress(self) -> f32 {
52        unsafe {
53            let __receiver = <AsyncOperation as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
54            ::unity::il2cpp_call!((::unity::module_base()+0x2c36450usize)as*mut u8,f32;
55(AsyncOperation)__receiver)
56        }
57    }
58    #[doc = "`set_priority(i32)` overload"]
59    fn set_priority(self, value: impl ::core::convert::Into<i32>) -> () {
60        unsafe {
61            let __receiver = <AsyncOperation as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
62            ::unity::il2cpp_call!((::unity::module_base()+0x2c364a0usize)as*mut u8,();
63(AsyncOperation)__receiver,(i32)::core::convert::Into::into(value))
64        }
65    }
66    #[doc = "`get_allowSceneActivation()` overload"]
67    fn get_allow_scene_activation(self) -> bool {
68        unsafe {
69            let __receiver = <AsyncOperation as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
70            ::unity::il2cpp_call!((::unity::module_base()+0x2c364f0usize)as*mut u8,bool;
71(AsyncOperation)__receiver)
72        }
73    }
74    #[doc = "`set_allowSceneActivation(bool)` overload"]
75    fn set_allow_scene_activation(self, value: impl ::core::convert::Into<bool>) -> () {
76        unsafe {
77            let __receiver = <AsyncOperation as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
78            ::unity::il2cpp_call!((::unity::module_base()+0x2c36540usize)as*mut u8,();
79(AsyncOperation)__receiver,(bool)::core::convert::Into::into(value))
80        }
81    }
82    #[doc = "`Finalize()` overload"]
83    fn finalize(self) -> () {
84        unsafe {
85            let __receiver = <AsyncOperation as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
86            {
87                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
88                let __vi = *__vt.get(1usize).unwrap_or_else(|| {
89                    panic!(
90                        "unity: virtual slot {}
91 out of range (vtable len {}
92) on the runtime class behind {}
93 (method `{}
94`)",
95                        1usize,
96                        __vt.len(),
97                        <AsyncOperation as ::unity::ClassIdentity>::NAME,
98                        "Finalize",
99                    )
100                });
101                let __inner: extern "C" fn(AsyncOperation, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
102                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
103                __inner(__receiver, __mi)
104            }
105        }
106    }
107    #[doc = "`InvokeCompletionEvent()` overload"]
108    fn invoke_completion_event(self) -> () {
109        unsafe {
110            let __receiver = <AsyncOperation as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
111            ::unity::il2cpp_call!((::unity::module_base()+0x2c36630usize)as*mut u8,();
112(AsyncOperation)__receiver)
113        }
114    }
115    #[doc = "`add_completed(crate::system::action_1::Action_1<crate::unity_engine::asyncoperation::AsyncOperation>)` overload"]
116    fn add_completed(
117        self,
118        value: impl ::core::convert::Into<crate::system::action_1::Action_1<crate::unity_engine::asyncoperation::AsyncOperation>>,
119    ) -> () {
120        unsafe {
121            let __receiver = <AsyncOperation as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
122            ::unity::il2cpp_call!((::unity::module_base()+0x2c366b0usize)as*mut u8,();
123(AsyncOperation)__receiver,(crate::system::action_1::Action_1<crate::unity_engine::asyncoperation::AsyncOperation>)::core::convert::Into::into(value))
124        }
125    }
126    #[doc = "`remove_completed(crate::system::action_1::Action_1<crate::unity_engine::asyncoperation::AsyncOperation>)` overload"]
127    fn remove_completed(
128        self,
129        value: impl ::core::convert::Into<crate::system::action_1::Action_1<crate::unity_engine::asyncoperation::AsyncOperation>>,
130    ) -> () {
131        unsafe {
132            let __receiver = <AsyncOperation as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
133            ::unity::il2cpp_call!((::unity::module_base()+0x2c367b0usize)as*mut u8,();
134(AsyncOperation)__receiver,(crate::system::action_1::Action_1<crate::unity_engine::asyncoperation::AsyncOperation>)::core::convert::Into::into(value))
135        }
136    }
137    #[doc = "`.ctor()` overload"]
138    fn ctor(self) -> () {
139        unsafe {
140            let __receiver = <AsyncOperation as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
141            ::unity::il2cpp_call!((::unity::module_base()+0x2c36840usize)as*mut u8,();
142(AsyncOperation)__receiver)
143        }
144    }
145}
146
147#[cfg(feature = "unity_engine-asyncoperation")]
148impl<__T: IAsyncOperation> IAsyncOperationMethods for __T {}
149
150#[cfg(feature = "unity_engine-asyncoperation")]
151impl AsyncOperation {
152    pub fn internal_destroy_method_info() -> &'static ::unity::il2cpp::MethodInfo {
153        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
154    }
155
156    pub fn get_is_done_method_info() -> &'static ::unity::il2cpp::MethodInfo {
157        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
158    }
159
160    pub fn get_progress_method_info() -> &'static ::unity::il2cpp::MethodInfo {
161        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
162    }
163
164    pub fn set_priority_method_info() -> &'static ::unity::il2cpp::MethodInfo {
165        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
166    }
167
168    pub fn get_allow_scene_activation_method_info() -> &'static ::unity::il2cpp::MethodInfo {
169        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
170    }
171
172    pub fn set_allow_scene_activation_method_info() -> &'static ::unity::il2cpp::MethodInfo {
173        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
174    }
175
176    pub fn finalize_method_info() -> &'static ::unity::il2cpp::MethodInfo {
177        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
178    }
179
180    pub fn invoke_completion_event_method_info() -> &'static ::unity::il2cpp::MethodInfo {
181        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
182    }
183
184    pub fn add_completed_method_info() -> &'static ::unity::il2cpp::MethodInfo {
185        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
186    }
187
188    pub fn remove_completed_method_info() -> &'static ::unity::il2cpp::MethodInfo {
189        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
190    }
191
192    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
193        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
194    }
195}
196
197#[cfg(feature = "unity_engine-asyncoperation")]
198impl AsyncOperation {
199    #[doc = "Direct (non-virtual) call to `AsyncOperation`'s own `Finalize`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
200    pub unsafe fn finalize(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
201        let __mi = Self::finalize_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-asyncoperation")]
208impl AsyncOperation {
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!(AsyncOperation),
217                ::core::stringify!(new),
218            )
219        });
220        <Self as IAsyncOperationMethods>::ctor(this);
221        this
222    }
223}
224
225#[cfg(feature = "unity_engine-asyncoperation")]
226#[doc(hidden)]
227pub mod prelude {
228    pub use super::{AsyncOperation, IAsyncOperation, IAsyncOperationMethods};
229    #[cfg(feature = "system-object")]
230    pub use crate::system::object::IObjectMethods;
231    #[cfg(feature = "unity_engine-yieldinstruction")]
232    pub use crate::unity_engine::yieldinstruction::IYieldInstructionMethods;
233    pub use crate::{system::object::IObject, unity_engine::yieldinstruction::IYieldInstruction};
234}