engage/generated/app/
singletonprocinst_1.rs1#[cfg(feature = "app-singletonprocinst_1-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 app::procinst::{IProcInst, ProcInst},
10 system::object::{IObject, Object},
11 };
12
13 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/singletonprocinst_1/SingletonProcInst_1.md"))]
14 #[::unity::class(namespace = "App", name = "SingletonProcInst`1")]
15 #[parent(crate::app::procinst::ProcInst)]
16 #[parent(crate::system::object::Object)]
17 pub struct SingletonProcInst_1<T0: ::unity::ClassIdentity> {
18 #[static_field]
19 #[rename(name = "s_Instance")]
20 pub s_instance: T0,
21 #[rename(name = "m_IsLoaded")]
22 pub m_is_loaded: bool,
23 }
24}
25
26#[cfg(feature = "app-singletonprocinst_1-types")]
27pub use __types::*;
28
29#[cfg(feature = "app-singletonprocinst_1")]
30#[::unity::methods]
31impl<T0: ::unity::ClassIdentity> SingletonProcInst_1<T0> {
32 #[doc = "`get_Instance()` overload"]
33 #[method(name = "get_Instance", args = 0)]
34 pub fn get_instance() -> T0;
35
36 #[doc = "`OnSingletonCreate()` overload"]
37 #[method(name = "OnSingletonCreate", args = 0)]
38 pub fn on_singleton_create(self) -> ();
39
40 #[doc = "`OnSingletonDispose()` overload"]
41 #[method(name = "OnSingletonDispose", args = 0)]
42 pub fn on_singleton_dispose(self) -> ();
43
44 #[doc = "`get_IsResume()` overload"]
45 #[method(name = "get_IsResume", args = 0)]
46 pub fn get_is_resume(self) -> bool;
47
48 #[doc = "`set_IsResume(bool)` overload"]
49 #[method(name = "set_IsResume", args = 1)]
50 pub fn set_is_resume(self, value: bool) -> ();
51
52 #[doc = "`get_Version()` overload"]
53 #[method(name = "get_Version", args = 0)]
54 pub fn get_version(self) -> i32;
55
56 #[doc = "`ResumeStart()` overload"]
57 #[method(name = "ResumeStart", args = 0)]
58 pub fn resume_start(self) -> ();
59
60 #[doc = "`ResumeEnd()` overload"]
61 #[method(name = "ResumeEnd", args = 0)]
62 pub fn resume_end(self) -> ();
63
64 #[doc = "`Serialize(crate::app::stream_2::Stream_2)` overload"]
65 #[method(name = "Serialize", args = 1)]
66 pub fn serialize(stream: crate::app::stream_2::Stream_2) -> ();
67
68 #[doc = "`Deserialize(crate::app::stream_2::Stream_2)` overload"]
69 #[method(name = "Deserialize", args = 1)]
70 pub fn deserialize(stream: crate::app::stream_2::Stream_2) -> ();
71
72 #[doc = "`get_GlobalAssetPath()` overload"]
73 #[method(name = "get_GlobalAssetPath", args = 0)]
74 pub fn get_global_asset_path(self) -> ::unity::Il2CppString;
75
76 #[doc = "`IsLoadingGlobalAsset()` overload"]
77 #[method(name = "IsLoadingGlobalAsset", args = 0)]
78 pub fn is_loading_global_asset(self) -> bool;
79
80 #[doc = "`ReleaseGlobalAsset()` overload"]
81 #[method(name = "ReleaseGlobalAsset", args = 0)]
82 pub fn release_global_asset(self) -> ();
83
84 #[doc = "`InstantiateGlobalAsset(crate::unity_engine::gameobject::GameObject)` overload"]
85 #[method(name = "InstantiateGlobalAsset", args = 1)]
86 pub fn instantiate_global_asset(self, parent: crate::unity_engine::gameobject::GameObject) -> crate::unity_engine::gameobject::GameObject;
87
88 #[doc = "`InstantiateGlobalAsset(crate::unity_engine::transform::Transform)` overload"]
89 #[method(name = "InstantiateGlobalAsset", args = 1)]
90 pub fn instantiate_global_asset_2(self, parent: crate::unity_engine::transform::Transform) -> crate::unity_engine::gameobject::GameObject;
91
92 #[doc = "`OnSerialize(crate::app::stream_2::Stream_2)` overload"]
93 #[method(name = "OnSerialize", args = 1)]
94 pub fn on_serialize(self, stream: crate::app::stream_2::Stream_2) -> ();
95
96 #[doc = "`OnDeserialize(crate::app::stream_2::Stream_2, i32)` overload"]
97 #[method(name = "OnDeserialize", args = 2)]
98 pub fn on_deserialize(self, stream: crate::app::stream_2::Stream_2, version: i32) -> ();
99
100 #[doc = "`op_Implicit(crate::app::singletonprocinst_1::SingletonProcInst_1<T0>)` overload"]
101 #[method(name = "op_Implicit", args = 1)]
102 pub fn op_implicit(exists: crate::app::singletonprocinst_1::SingletonProcInst_1<T0>) -> bool;
103
104 #[doc = "`.ctor()` overload"]
105 #[method(name = ".ctor", args = 0)]
106 pub fn ctor(self) -> ();
107
108 #[doc = "`.cctor()` overload"]
109 #[method(name = ".cctor", args = 0)]
110 pub fn cctor() -> ();
111}
112
113#[cfg(feature = "app-singletonprocinst_1")]
114impl<T0: ::unity::ClassIdentity> SingletonProcInst_1<T0> {
115 #[doc = "`.ctor()` — no args"]
116 pub fn new() -> Self {
117 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
118 panic!(
119 "{}
120::{}
121 failed to instantiate",
122 ::core::stringify!(SingletonProcInst_1),
123 ::core::stringify!(new),
124 )
125 });
126 <Self as ISingletonProcInst_1Methods<T0>>::ctor(this);
127 this
128 }
129}
130
131#[cfg(feature = "app-singletonprocinst_1")]
132#[doc(hidden)]
133pub mod prelude {
134 pub use super::{ISingletonProcInst_1, ISingletonProcInst_1Methods, SingletonProcInst_1};
135 #[cfg(feature = "app-procinst")]
136 pub use crate::app::procinst::IProcInstMethods;
137 #[cfg(feature = "system-object")]
138 pub use crate::system::object::IObjectMethods;
139 pub use crate::{app::procinst::IProcInst, system::object::IObject};
140}