engage/generated/unity_engine/
application.rs1#[cfg(feature = "unity_engine-application-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::{
9 delegate::{Delegate, IDelegate},
10 multicastdelegate::{IMulticastDelegate, MulticastDelegate},
11 object::{IObject, Object},
12 };
13
14 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/application/Application.md"))]
15 #[::unity::class(namespace = "UnityEngine", name = "Application")]
16 #[parent(crate::system::object::Object)]
17 pub struct Application {
18 #[static_field]
19 #[rename(name = "lowMemory")]
20 pub low_memory: crate::unity_engine::application::Application_LowMemoryCallback,
21 #[static_field]
22 #[rename(name = "s_LogCallbackHandler")]
23 pub s_log_callback_handler: crate::unity_engine::application::Application_LogCallback,
24 #[static_field]
25 #[rename(name = "s_LogCallbackHandlerThreaded")]
26 pub s_log_callback_handler_threaded: crate::unity_engine::application::Application_LogCallback,
27 #[static_field]
28 #[rename(name = "focusChanged")]
29 pub focus_changed: crate::system::action_1::Action_1<bool>,
30 #[static_field]
31 #[rename(name = "deepLinkActivated")]
32 pub deep_link_activated: crate::system::action_1::Action_1<::unity::Il2CppString>,
33 #[static_field]
34 #[rename(name = "wantsToQuit")]
35 pub wants_to_quit: crate::system::func_1::Func_1<bool>,
36 #[static_field]
37 #[rename(name = "quitting")]
38 pub quitting: crate::system::action::Action,
39 #[static_field]
40 #[rename(name = "unloading")]
41 pub unloading: crate::system::action::Action,
42 }
43
44 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/application/Application_LogCallback.md"))]
45 #[::unity::class(namespace = "UnityEngine", name = "Application.LogCallback")]
46 #[parent(crate::system::multicastdelegate::MulticastDelegate)]
47 pub struct Application_LogCallback {}
48
49 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/application/Application_LowMemoryCallback.md"))]
50 #[::unity::class(namespace = "UnityEngine", name = "Application.LowMemoryCallback")]
51 #[parent(crate::system::multicastdelegate::MulticastDelegate)]
52 pub struct Application_LowMemoryCallback {}
53}
54
55#[cfg(feature = "unity_engine-application-types")]
56pub use __types::*;
57
58#[cfg(feature = "unity_engine-application")]
59impl Application {
60 #[doc = "`get_isPlaying()` overload"]
61 pub fn get_is_playing() -> bool {
62 unsafe {
63 ::unity::il2cpp_call!((::unity::module_base()+0x2c35760usize)as*mut u8,bool;
64 )
65 }
66 }
67
68 #[doc = "`get_dataPath()` overload"]
69 pub fn get_data_path() -> ::unity::Il2CppString {
70 unsafe {
71 ::unity::il2cpp_call!((::unity::module_base()+0x2c357a0usize)as*mut u8, ::unity::Il2CppString;
72 )
73 }
74 }
75
76 #[doc = "`get_streamingAssetsPath()` overload"]
77 pub fn get_streaming_assets_path() -> ::unity::Il2CppString {
78 unsafe {
79 ::unity::il2cpp_call!((::unity::module_base()+0x2c357e0usize)as*mut u8, ::unity::Il2CppString;
80 )
81 }
82 }
83
84 #[doc = "`get_persistentDataPath()` overload"]
85 pub fn get_persistent_data_path() -> ::unity::Il2CppString {
86 unsafe {
87 ::unity::il2cpp_call!((::unity::module_base()+0x2c35820usize)as*mut u8, ::unity::Il2CppString;
88 )
89 }
90 }
91
92 #[doc = "`get_temporaryCachePath()` overload"]
93 pub fn get_temporary_cache_path() -> ::unity::Il2CppString {
94 unsafe {
95 ::unity::il2cpp_call!((::unity::module_base()+0x2c35860usize)as*mut u8, ::unity::Il2CppString;
96 )
97 }
98 }
99
100 #[doc = "`get_productName()` overload"]
101 pub fn get_product_name() -> ::unity::Il2CppString {
102 unsafe {
103 ::unity::il2cpp_call!((::unity::module_base()+0x2c358a0usize)as*mut u8, ::unity::Il2CppString;
104 )
105 }
106 }
107
108 #[doc = "`OpenURL(::unity::Il2CppString)` overload"]
109 pub fn open_url(url: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
110 unsafe {
111 ::unity::il2cpp_call!((::unity::module_base()+0x2c358e0usize)as*mut u8,();
112(::unity::Il2CppString)::core::convert::Into::into(url))
113 }
114 }
115
116 #[doc = "`set_backgroundLoadingPriority(crate::unity_engine::threadpriority::ThreadPriority)` overload"]
117 pub fn set_background_loading_priority(value: impl ::core::convert::Into<crate::unity_engine::threadpriority::ThreadPriority>) -> () {
118 unsafe {
119 ::unity::il2cpp_call!((::unity::module_base()+0x2c35930usize)as*mut u8,();
120(crate::unity_engine::threadpriority::ThreadPriority)::core::convert::Into::into(value))
121 }
122 }
123
124 #[doc = "`get_platform()` overload"]
125 pub fn get_platform() -> crate::unity_engine::runtimeplatform::RuntimePlatform {
126 unsafe {
127 ::unity::il2cpp_call!((::unity::module_base()+0x2c35980usize)as*mut u8,crate::unity_engine::runtimeplatform::RuntimePlatform;
128 )
129 }
130 }
131
132 #[doc = "`get_isMobilePlatform()` overload"]
133 pub fn get_is_mobile_platform() -> bool {
134 unsafe {
135 ::unity::il2cpp_call!((::unity::module_base()+0x2c359c0usize)as*mut u8,bool;
136 )
137 }
138 }
139
140 #[doc = "`CallLowMemory()` overload"]
141 pub fn call_low_memory() -> () {
142 unsafe {
143 ::unity::il2cpp_call!((::unity::module_base()+0x2c35a60usize)as*mut u8,();
144 )
145 }
146 }
147
148 #[doc = "`CallLogCallback(::unity::Il2CppString, ::unity::Il2CppString, crate::unity_engine::logtype::LogType, bool)` overload"]
149 pub fn call_log_callback(
150 log_string: impl ::core::convert::Into<::unity::Il2CppString>,
151 stack_trace: impl ::core::convert::Into<::unity::Il2CppString>,
152 r#type: impl ::core::convert::Into<crate::unity_engine::logtype::LogType>,
153 invoked_on_main_thread: impl ::core::convert::Into<bool>,
154 ) -> () {
155 unsafe {
156 ::unity::il2cpp_call!((::unity::module_base()+0x2c35ac0usize)as*mut u8,();
157(::unity::Il2CppString)::core::convert::Into::into(log_string),(::unity::Il2CppString)::core::convert::Into::into(stack_trace),(crate::unity_engine::logtype::LogType)::core::convert::Into::into(r#type),(bool)::core::convert::Into::into(invoked_on_main_thread))
158 }
159 }
160
161 #[doc = "`Internal_ApplicationWantsToQuit()` overload"]
162 pub fn internal_application_wants_to_quit() -> bool {
163 unsafe {
164 ::unity::il2cpp_call!((::unity::module_base()+0x2c35b80usize)as*mut u8,bool;
165 )
166 }
167 }
168
169 #[doc = "`Internal_ApplicationQuit()` overload"]
170 pub fn internal_application_quit() -> () {
171 unsafe {
172 ::unity::il2cpp_call!((::unity::module_base()+0x2c35ed0usize)as*mut u8,();
173 )
174 }
175 }
176
177 #[doc = "`Internal_ApplicationUnload()` overload"]
178 pub fn internal_application_unload() -> () {
179 unsafe {
180 ::unity::il2cpp_call!((::unity::module_base()+0x2c35f30usize)as*mut u8,();
181 )
182 }
183 }
184
185 #[doc = "`InvokeOnBeforeRender()` overload"]
186 pub fn invoke_on_before_render() -> () {
187 unsafe {
188 ::unity::il2cpp_call!((::unity::module_base()+0x2c35f90usize)as*mut u8,();
189 )
190 }
191 }
192
193 #[doc = "`InvokeFocusChanged(bool)` overload"]
194 pub fn invoke_focus_changed(focus: impl ::core::convert::Into<bool>) -> () {
195 unsafe {
196 ::unity::il2cpp_call!((::unity::module_base()+0x2c36190usize)as*mut u8,();
197(bool)::core::convert::Into::into(focus))
198 }
199 }
200
201 #[doc = "`InvokeDeepLinkActivated(::unity::Il2CppString)` overload"]
202 pub fn invoke_deep_link_activated(url: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
203 unsafe {
204 ::unity::il2cpp_call!((::unity::module_base()+0x2c36220usize)as*mut u8,();
205(::unity::Il2CppString)::core::convert::Into::into(url))
206 }
207 }
208
209 #[doc = "`get_isEditor()` overload"]
210 pub fn get_is_editor() -> bool {
211 unsafe {
212 ::unity::il2cpp_call!((::unity::module_base()+0x2c362b0usize)as*mut u8,bool;
213 )
214 }
215 }
216}
217
218#[cfg(feature = "unity_engine-application")]
219impl Application {
220 pub fn get_is_playing_method_info() -> &'static ::unity::il2cpp::MethodInfo {
221 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
222 }
223
224 pub fn get_data_path_method_info() -> &'static ::unity::il2cpp::MethodInfo {
225 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
226 }
227
228 pub fn get_streaming_assets_path_method_info() -> &'static ::unity::il2cpp::MethodInfo {
229 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
230 }
231
232 pub fn get_persistent_data_path_method_info() -> &'static ::unity::il2cpp::MethodInfo {
233 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
234 }
235
236 pub fn get_temporary_cache_path_method_info() -> &'static ::unity::il2cpp::MethodInfo {
237 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
238 }
239
240 pub fn get_product_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
241 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
242 }
243
244 pub fn open_url_method_info() -> &'static ::unity::il2cpp::MethodInfo {
245 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
246 }
247
248 pub fn set_background_loading_priority_method_info() -> &'static ::unity::il2cpp::MethodInfo {
249 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
250 }
251
252 pub fn get_platform_method_info() -> &'static ::unity::il2cpp::MethodInfo {
253 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
254 }
255
256 pub fn get_is_mobile_platform_method_info() -> &'static ::unity::il2cpp::MethodInfo {
257 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
258 }
259
260 pub fn call_low_memory_method_info() -> &'static ::unity::il2cpp::MethodInfo {
261 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
262 }
263
264 pub fn call_log_callback_method_info() -> &'static ::unity::il2cpp::MethodInfo {
265 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
266 }
267
268 pub fn internal_application_wants_to_quit_method_info() -> &'static ::unity::il2cpp::MethodInfo {
269 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
270 }
271
272 pub fn internal_application_quit_method_info() -> &'static ::unity::il2cpp::MethodInfo {
273 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
274 }
275
276 pub fn internal_application_unload_method_info() -> &'static ::unity::il2cpp::MethodInfo {
277 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
278 }
279
280 pub fn invoke_on_before_render_method_info() -> &'static ::unity::il2cpp::MethodInfo {
281 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
282 }
283
284 pub fn invoke_focus_changed_method_info() -> &'static ::unity::il2cpp::MethodInfo {
285 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
286 }
287
288 pub fn invoke_deep_link_activated_method_info() -> &'static ::unity::il2cpp::MethodInfo {
289 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[17]
290 }
291
292 pub fn get_is_editor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
293 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[18]
294 }
295}
296
297#[cfg(feature = "unity_engine-application")]
298pub trait IApplication_LogCallbackMethods: IApplication_LogCallback {
299 #[doc = "`.ctor(crate::system::object::Object, ::unity::IntPtr)` overload"]
300 fn ctor(self, object: impl ::core::convert::Into<crate::system::object::Object>, method: impl ::core::convert::Into<::unity::IntPtr>) -> () {
301 unsafe {
302 let __receiver =
303 <Application_LogCallback as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
304 ::unity::il2cpp_call!((::unity::module_base()+0x379acc0usize)as*mut u8,();
305(Application_LogCallback)__receiver,(crate::system::object::Object)::core::convert::Into::into(object),(::unity::IntPtr)::core::convert::Into::into(method))
306 }
307 }
308 #[doc = "`Invoke(::unity::Il2CppString, ::unity::Il2CppString, crate::unity_engine::logtype::LogType)` overload"]
309 fn invoke(
310 self,
311 condition: impl ::core::convert::Into<::unity::Il2CppString>,
312 stack_trace: impl ::core::convert::Into<::unity::Il2CppString>,
313 r#type: impl ::core::convert::Into<crate::unity_engine::logtype::LogType>,
314 ) -> () {
315 unsafe {
316 let __receiver =
317 <Application_LogCallback as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
318 {
319 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
320 let __vi = *__vt.get(13usize).unwrap_or_else(|| {
321 panic!(
322 "unity: virtual slot {}
323 out of range (vtable len {}
324) on the runtime class behind {}
325 (method `{}
326`)",
327 13usize,
328 __vt.len(),
329 <Application_LogCallback as ::unity::ClassIdentity>::NAME,
330 "Invoke",
331 )
332 });
333 let __inner: extern "C" fn(
334 Application_LogCallback,
335 ::unity::Il2CppString,
336 ::unity::Il2CppString,
337 crate::unity_engine::logtype::LogType,
338 ::unity::OptionalMethod,
339 ) -> () = ::core::mem::transmute(__vi.method_ptr);
340 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
341 __inner(
342 __receiver,
343 ::core::convert::Into::into(condition),
344 ::core::convert::Into::into(stack_trace),
345 ::core::convert::Into::into(r#type),
346 __mi,
347 )
348 }
349 }
350 }
351}
352
353#[cfg(feature = "unity_engine-application")]
354impl<__T: IApplication_LogCallback> IApplication_LogCallbackMethods for __T {}
355
356#[cfg(feature = "unity_engine-application")]
357impl Application_LogCallback {
358 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
359 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
360 }
361
362 pub fn invoke_method_info() -> &'static ::unity::il2cpp::MethodInfo {
363 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
364 }
365}
366
367#[cfg(feature = "unity_engine-application")]
368impl Application_LogCallback {
369 #[doc = "Direct (non-virtual) call to `Application_LogCallback`'s own `Invoke`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
370 pub unsafe fn invoke(
371 this: impl ::core::convert::Into<::unity::IlInstance>,
372 condition: ::unity::Il2CppString,
373 stack_trace: ::unity::Il2CppString,
374 r#type: crate::unity_engine::logtype::LogType,
375 ) -> () {
376 let __mi = Self::invoke_method_info();
377 let __inner: extern "C" fn(
378 ::unity::IlInstance,
379 ::unity::Il2CppString,
380 ::unity::Il2CppString,
381 crate::unity_engine::logtype::LogType,
382 ::unity::OptionalMethod,
383 ) -> () = ::core::mem::transmute(__mi.method_ptr);
384 __inner(this.into(), condition, stack_trace, r#type, ::core::option::Option::None)
385 }
386}
387
388#[cfg(feature = "unity_engine-application")]
389impl Application_LogCallback {
390 #[doc = "`.ctor(crate::system::object::Object, ::unity::IntPtr)` — overload selector"]
391 pub fn new(object: crate::system::object::Object, method: ::unity::IntPtr) -> Self {
392 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
393 panic!(
394 "{}
395::{}
396 failed to instantiate",
397 ::core::stringify!(Application_LogCallback),
398 ::core::stringify!(new),
399 )
400 });
401 <Self as IApplication_LogCallbackMethods>::ctor(this, object, method);
402 this
403 }
404}
405
406#[cfg(feature = "unity_engine-application")]
407pub trait IApplication_LowMemoryCallbackMethods: IApplication_LowMemoryCallback {
408 #[doc = "`.ctor(crate::system::object::Object, ::unity::IntPtr)` overload"]
409 fn ctor(self, object: impl ::core::convert::Into<crate::system::object::Object>, method: impl ::core::convert::Into<::unity::IntPtr>) -> () {
410 unsafe {
411 let __receiver =
412 <Application_LowMemoryCallback as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
413 ::unity::il2cpp_call!((::unity::module_base()+0x379b140usize)as*mut u8,();
414(Application_LowMemoryCallback)__receiver,(crate::system::object::Object)::core::convert::Into::into(object),(::unity::IntPtr)::core::convert::Into::into(method))
415 }
416 }
417 #[doc = "`Invoke()` overload"]
418 fn invoke(self) -> () {
419 unsafe {
420 let __receiver =
421 <Application_LowMemoryCallback as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
422 {
423 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
424 let __vi = *__vt.get(13usize).unwrap_or_else(|| {
425 panic!(
426 "unity: virtual slot {}
427 out of range (vtable len {}
428) on the runtime class behind {}
429 (method `{}
430`)",
431 13usize,
432 __vt.len(),
433 <Application_LowMemoryCallback as ::unity::ClassIdentity>::NAME,
434 "Invoke",
435 )
436 });
437 let __inner: extern "C" fn(Application_LowMemoryCallback, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
438 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
439 __inner(__receiver, __mi)
440 }
441 }
442 }
443}
444
445#[cfg(feature = "unity_engine-application")]
446impl<__T: IApplication_LowMemoryCallback> IApplication_LowMemoryCallbackMethods for __T {}
447
448#[cfg(feature = "unity_engine-application")]
449impl Application_LowMemoryCallback {
450 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
451 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
452 }
453
454 pub fn invoke_method_info() -> &'static ::unity::il2cpp::MethodInfo {
455 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
456 }
457}
458
459#[cfg(feature = "unity_engine-application")]
460impl Application_LowMemoryCallback {
461 #[doc = "Direct (non-virtual) call to `Application_LowMemoryCallback`'s own `Invoke`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
462 pub unsafe fn invoke(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
463 let __mi = Self::invoke_method_info();
464 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
465 __inner(this.into(), ::core::option::Option::None)
466 }
467}
468
469#[cfg(feature = "unity_engine-application")]
470impl Application_LowMemoryCallback {
471 #[doc = "`.ctor(crate::system::object::Object, ::unity::IntPtr)` — overload selector"]
472 pub fn new(object: crate::system::object::Object, method: ::unity::IntPtr) -> Self {
473 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
474 panic!(
475 "{}
476::{}
477 failed to instantiate",
478 ::core::stringify!(Application_LowMemoryCallback),
479 ::core::stringify!(new),
480 )
481 });
482 <Self as IApplication_LowMemoryCallbackMethods>::ctor(this, object, method);
483 this
484 }
485}
486
487#[cfg(feature = "unity_engine-application")]
488#[doc(hidden)]
489pub mod prelude {
490 pub use super::{
491 Application, Application_LogCallback, Application_LowMemoryCallback, IApplication, IApplication_LogCallback, IApplication_LogCallbackMethods,
492 IApplication_LowMemoryCallback, IApplication_LowMemoryCallbackMethods,
493 };
494 #[cfg(feature = "system-delegate")]
495 pub use crate::system::delegate::IDelegateMethods;
496 #[cfg(feature = "system-multicastdelegate")]
497 pub use crate::system::multicastdelegate::IMulticastDelegateMethods;
498 #[cfg(feature = "system-object")]
499 pub use crate::system::object::IObjectMethods;
500 pub use crate::system::{delegate::IDelegate, multicastdelegate::IMulticastDelegate, object::IObject};
501}