engage/generated/unity_engine/switch/
performance.rs1#[cfg(feature = "unity_engine-switch-performance-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::{
9 object::{IObject, Object},
10 r#enum::{Enum, IEnum},
11 valuetype::{IValueType, ValueType},
12 };
13
14 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/switch/performance/Performance_Debug_HudMode.md"))]
15 #[repr(C)]
16 #[derive(::core::clone::Clone, ::core::marker::Copy, ::core::fmt::Debug, ::core::cmp::PartialEq, ::core::cmp::Eq)]
17 pub struct Performance_Debug_HudMode {
18 pub value: i32,
19 }
20 impl ::unity::ClassIdentity for Performance_Debug_HudMode {
21 const NAME: &'static str = "Performance.Debug.HudMode";
22 const NAMESPACE: &'static str = "UnityEngine.Switch";
23
24 fn class() -> ::unity::Class {
25 static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
26 *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
27 }
28 }
29 impl ::unity::IlType for Performance_Debug_HudMode {
30 fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
31 &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
32 }
33 }
34 impl Performance_Debug_HudMode {
35 pub fn none() -> Self {
36 Self { value: 0 }
37 }
38
39 pub fn basic() -> Self {
40 Self { value: 1 }
41 }
42
43 pub fn memory() -> Self {
44 Self { value: 2 }
45 }
46
47 pub fn gpu_counters() -> Self {
48 Self { value: 3 }
49 }
50 }
51
52 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/switch/performance/Performance.md"))]
53 #[::unity::class(namespace = "UnityEngine.Switch", name = "Performance")]
54 #[parent(crate::system::object::Object)]
55 pub struct Performance {}
56
57 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/switch/performance/Performance_PerformanceMode.md"))]
58 #[repr(C)]
59 #[derive(::core::clone::Clone, ::core::marker::Copy, ::core::fmt::Debug, ::core::cmp::PartialEq, ::core::cmp::Eq)]
60 pub struct Performance_PerformanceMode {
61 pub value: i32,
62 }
63 impl ::unity::ClassIdentity for Performance_PerformanceMode {
64 const NAME: &'static str = "Performance.PerformanceMode";
65 const NAMESPACE: &'static str = "UnityEngine.Switch";
66
67 fn class() -> ::unity::Class {
68 static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
69 *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
70 }
71 }
72 impl ::unity::IlType for Performance_PerformanceMode {
73 fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
74 &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
75 }
76 }
77 impl Performance_PerformanceMode {
78 pub fn invalid() -> Self {
79 Self { value: -1 }
80 }
81
82 pub fn normal() -> Self {
83 Self { value: 0 }
84 }
85
86 pub fn boost() -> Self {
87 Self { value: 1 }
88 }
89 }
90
91 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/switch/performance/Performance_Debug.md"))]
92 #[::unity::class(namespace = "UnityEngine.Switch", name = "Performance.Debug")]
93 #[parent(crate::system::object::Object)]
94 pub struct Performance_Debug {}
95
96 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/switch/performance/Performance_CpuBoostMode.md"))]
97 #[repr(C)]
98 #[derive(::core::clone::Clone, ::core::marker::Copy, ::core::fmt::Debug, ::core::cmp::PartialEq, ::core::cmp::Eq)]
99 pub struct Performance_CpuBoostMode {
100 pub value: i32,
101 }
102 impl ::unity::ClassIdentity for Performance_CpuBoostMode {
103 const NAME: &'static str = "Performance.CpuBoostMode";
104 const NAMESPACE: &'static str = "UnityEngine.Switch";
105
106 fn class() -> ::unity::Class {
107 static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
108 *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
109 }
110 }
111 impl ::unity::IlType for Performance_CpuBoostMode {
112 fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
113 &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
114 }
115 }
116 impl Performance_CpuBoostMode {
117 pub fn normal() -> Self {
118 Self { value: 0 }
119 }
120
121 pub fn fast_load() -> Self {
122 Self { value: 1 }
123 }
124 }
125}
126
127#[cfg(feature = "unity_engine-switch-performance-types")]
128pub use __types::*;
129
130#[cfg(feature = "unity_engine-switch-performance")]
131impl Performance {
132 #[doc = "`SetCpuBoostMode(crate::unity_engine::switch::performance::Performance_CpuBoostMode)` overload"]
133 pub fn set_cpu_boost_mode(mode: impl ::core::convert::Into<crate::unity_engine::switch::performance::Performance_CpuBoostMode>) -> () {
134 unsafe {
135 ::unity::il2cpp_call!((::unity::module_base()+0x3f418c0usize)as*mut u8,();
136(crate::unity_engine::switch::performance::Performance_CpuBoostMode)::core::convert::Into::into(mode))
137 }
138 }
139
140 #[doc = "`SetCpuBoostMode_Internal(crate::unity_engine::switch::performance::Performance_CpuBoostMode)` overload"]
141 pub fn set_cpu_boost_mode_internal(mode: impl ::core::convert::Into<crate::unity_engine::switch::performance::Performance_CpuBoostMode>) -> () {
142 unsafe {
143 ::unity::il2cpp_call!((::unity::module_base()+0x3f41910usize)as*mut u8,();
144(crate::unity_engine::switch::performance::Performance_CpuBoostMode)::core::convert::Into::into(mode))
145 }
146 }
147
148 #[doc = "`get_mode()` overload"]
149 pub fn get_mode() -> crate::unity_engine::switch::performance::Performance_PerformanceMode {
150 unsafe {
151 ::unity::il2cpp_call!((::unity::module_base()+0x3f41960usize)as*mut u8,crate::unity_engine::switch::performance::Performance_PerformanceMode;
152 )
153 }
154 }
155
156 #[doc = "`GetMode_Internal()` overload"]
157 pub fn get_mode_internal() -> crate::unity_engine::switch::performance::Performance_PerformanceMode {
158 unsafe {
159 ::unity::il2cpp_call!((::unity::module_base()+0x3f419a0usize)as*mut u8,crate::unity_engine::switch::performance::Performance_PerformanceMode;
160 )
161 }
162 }
163}
164
165#[cfg(feature = "unity_engine-switch-performance")]
166impl Performance {
167 pub fn set_cpu_boost_mode_method_info() -> &'static ::unity::il2cpp::MethodInfo {
168 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
169 }
170
171 pub fn set_cpu_boost_mode_internal_method_info() -> &'static ::unity::il2cpp::MethodInfo {
172 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
173 }
174
175 pub fn get_mode_method_info() -> &'static ::unity::il2cpp::MethodInfo {
176 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
177 }
178
179 pub fn get_mode_internal_method_info() -> &'static ::unity::il2cpp::MethodInfo {
180 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
181 }
182}
183
184#[cfg(feature = "unity_engine-switch-performance")]
185impl Performance_Debug {
186 #[doc = "`SetHUDMode(crate::unity_engine::switch::performance::Performance_Debug_HudMode)` overload"]
187 pub fn set_hud_mode(mode: impl ::core::convert::Into<crate::unity_engine::switch::performance::Performance_Debug_HudMode>) -> () {
188 unsafe {
189 ::unity::il2cpp_call!((::unity::module_base()+0x3f41e10usize)as*mut u8,();
190(crate::unity_engine::switch::performance::Performance_Debug_HudMode)::core::convert::Into::into(mode))
191 }
192 }
193}
194
195#[cfg(feature = "unity_engine-switch-performance")]
196impl Performance_Debug {
197 pub fn set_hud_mode_method_info() -> &'static ::unity::il2cpp::MethodInfo {
198 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
199 }
200}
201
202#[cfg(feature = "unity_engine-switch-performance")]
203#[doc(hidden)]
204pub mod prelude {
205 pub use super::{
206 IPerformance, IPerformance_Debug, Performance, Performance_CpuBoostMode, Performance_Debug, Performance_Debug_HudMode,
207 Performance_PerformanceMode,
208 };
209 #[cfg(feature = "system-object")]
210 pub use crate::system::object::IObjectMethods;
211 #[cfg(feature = "system-enum")]
212 pub use crate::system::r#enum::IEnumMethods;
213 #[cfg(feature = "system-valuetype")]
214 pub use crate::system::valuetype::IValueTypeMethods;
215 pub use crate::system::{object::IObject, r#enum::IEnum, valuetype::IValueType};
216}