engage/generated/unity_engine/rendering/
profilingsampler.rs1#[cfg(feature = "unity_engine-rendering-profilingsampler-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/rendering/profilingsampler/ProfilingSampler.md"))]
11 #[::unity::class(namespace = "UnityEngine.Rendering", name = "ProfilingSampler")]
12 #[parent(crate::system::object::Object)]
13 pub struct ProfilingSampler {
14 #[offset(40)]
15 #[rename(name = "m_Recorder")]
16 pub m_recorder: crate::unity_engine::profiling::recorder::Recorder,
17 #[offset(48)]
18 #[rename(name = "m_InlineRecorder")]
19 pub m_inline_recorder: crate::unity_engine::profiling::recorder::Recorder,
20 }
21}
22
23#[cfg(feature = "unity_engine-rendering-profilingsampler-types")]
24pub use __types::*;
25
26#[cfg(feature = "unity_engine-rendering-profilingsampler")]
27impl ProfilingSampler {
28 pub fn get<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
29 marker: impl ::core::convert::Into<M0>,
30 ) -> crate::unity_engine::rendering::profilingsampler::ProfilingSampler {
31 static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> =
32 ::std::sync::LazyLock::new(|| ::unity::lookup::method_info_on_class(<ProfilingSampler as ::unity::ClassIdentity>::class(), "Get", 1));
33 #[allow(clippy::type_complexity)]
34 static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
35 ::std::sync::OnceLock::new();
36 let _ = true;
37 let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
38 ::core::result::Result::Ok(mi) => *mi,
39 ::core::result::Result::Err(e) => {
40 panic!(
41 "method lookup failed: {}
42::{}
43: {}
44",
45 <ProfilingSampler as ::unity::ClassIdentity>::NAME,
46 "Get",
47 e
48 )
49 },
50 };
51 let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
52 let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
53 let __inflated: &'static ::unity::il2cpp::MethodInfo = {
54 let mut __guard = __cache.lock().unwrap();
55 *__guard
56 .entry(__key)
57 .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
58 };
59 unsafe {
60 let __f: extern "C" fn(M0, ::unity::OptionalMethod) -> crate::unity_engine::rendering::profilingsampler::ProfilingSampler =
61 ::core::mem::transmute(__inflated.method_ptr);
62 let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
63 __f(::core::convert::Into::into(marker), ::core::option::Option::Some(__mi_opaque))
64 }
65 }
66}
67
68#[cfg(feature = "unity_engine-rendering-profilingsampler")]
69pub trait IProfilingSamplerMethods: IProfilingSampler {
70 #[doc = "`.ctor(::unity::Il2CppString)` overload"]
71 fn ctor(self, name: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
72 unsafe {
73 let __receiver = <ProfilingSampler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
74 ::unity::il2cpp_call!((::unity::module_base()+0x30acee0usize)as*mut u8,();
75(ProfilingSampler)__receiver,(::unity::Il2CppString)::core::convert::Into::into(name))
76 }
77 }
78 #[doc = "`Begin(crate::unity_engine::rendering::commandbuffer::CommandBuffer)` overload"]
79 fn begin(self, cmd: impl ::core::convert::Into<crate::unity_engine::rendering::commandbuffer::CommandBuffer>) -> () {
80 unsafe {
81 let __receiver = <ProfilingSampler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
82 ::unity::il2cpp_call!((::unity::module_base()+0x30ad030usize)as*mut u8,();
83(ProfilingSampler)__receiver,(crate::unity_engine::rendering::commandbuffer::CommandBuffer)::core::convert::Into::into(cmd))
84 }
85 }
86 #[doc = "`End(crate::unity_engine::rendering::commandbuffer::CommandBuffer)` overload"]
87 fn end(self, cmd: impl ::core::convert::Into<crate::unity_engine::rendering::commandbuffer::CommandBuffer>) -> () {
88 unsafe {
89 let __receiver = <ProfilingSampler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
90 ::unity::il2cpp_call!((::unity::module_base()+0x30ad0a0usize)as*mut u8,();
91(ProfilingSampler)__receiver,(crate::unity_engine::rendering::commandbuffer::CommandBuffer)::core::convert::Into::into(cmd))
92 }
93 }
94 #[doc = "`IsValid()` overload"]
95 fn is_valid(self) -> bool {
96 unsafe {
97 let __receiver = <ProfilingSampler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
98 ::unity::il2cpp_call!((::unity::module_base()+0x30ad110usize)as*mut u8,bool;
99(ProfilingSampler)__receiver)
100 }
101 }
102 #[doc = "`get_sampler()` overload"]
103 fn get_sampler(self) -> crate::unity_engine::profiling::customsampler::CustomSampler {
104 unsafe {
105 let __receiver = <ProfilingSampler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
106 ::unity::il2cpp_call!((::unity::module_base()+0x30ad130usize)as*mut u8,crate::unity_engine::profiling::customsampler::CustomSampler;
107(ProfilingSampler)__receiver)
108 }
109 }
110 #[doc = "`set_sampler(crate::unity_engine::profiling::customsampler::CustomSampler)` overload"]
111 fn set_sampler(self, value: impl ::core::convert::Into<crate::unity_engine::profiling::customsampler::CustomSampler>) -> () {
112 unsafe {
113 let __receiver = <ProfilingSampler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
114 ::unity::il2cpp_call!((::unity::module_base()+0x30ad140usize)as*mut u8,();
115(ProfilingSampler)__receiver,(crate::unity_engine::profiling::customsampler::CustomSampler)::core::convert::Into::into(value))
116 }
117 }
118 #[doc = "`get_inlineSampler()` overload"]
119 fn get_inline_sampler(self) -> crate::unity_engine::profiling::customsampler::CustomSampler {
120 unsafe {
121 let __receiver = <ProfilingSampler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
122 ::unity::il2cpp_call!((::unity::module_base()+0x30ad150usize)as*mut u8,crate::unity_engine::profiling::customsampler::CustomSampler;
123(ProfilingSampler)__receiver)
124 }
125 }
126 #[doc = "`set_inlineSampler(crate::unity_engine::profiling::customsampler::CustomSampler)` overload"]
127 fn set_inline_sampler(self, value: impl ::core::convert::Into<crate::unity_engine::profiling::customsampler::CustomSampler>) -> () {
128 unsafe {
129 let __receiver = <ProfilingSampler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
130 ::unity::il2cpp_call!((::unity::module_base()+0x30ad160usize)as*mut u8,();
131(ProfilingSampler)__receiver,(crate::unity_engine::profiling::customsampler::CustomSampler)::core::convert::Into::into(value))
132 }
133 }
134 #[doc = "`get_name()` overload"]
135 fn get_name(self) -> ::unity::Il2CppString {
136 unsafe {
137 let __receiver = <ProfilingSampler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
138 ::unity::il2cpp_call!((::unity::module_base()+0x30ad170usize)as*mut u8, ::unity::Il2CppString;
139(ProfilingSampler)__receiver)
140 }
141 }
142 #[doc = "`set_name(::unity::Il2CppString)` overload"]
143 fn set_name(self, value: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
144 unsafe {
145 let __receiver = <ProfilingSampler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
146 ::unity::il2cpp_call!((::unity::module_base()+0x30ad180usize)as*mut u8,();
147(ProfilingSampler)__receiver,(::unity::Il2CppString)::core::convert::Into::into(value))
148 }
149 }
150 #[doc = "`set_enableRecording(bool)` overload"]
151 fn set_enable_recording(self, value: impl ::core::convert::Into<bool>) -> () {
152 unsafe {
153 let __receiver = <ProfilingSampler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
154 ::unity::il2cpp_call!((::unity::module_base()+0x30ad190usize)as*mut u8,();
155(ProfilingSampler)__receiver,(bool)::core::convert::Into::into(value))
156 }
157 }
158 #[doc = "`get_gpuElapsedTime()` overload"]
159 fn get_gpu_elapsed_time(self) -> f32 {
160 unsafe {
161 let __receiver = <ProfilingSampler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
162 ::unity::il2cpp_call!((::unity::module_base()+0x30ad1d0usize)as*mut u8,f32;
163(ProfilingSampler)__receiver)
164 }
165 }
166 #[doc = "`get_gpuSampleCount()` overload"]
167 fn get_gpu_sample_count(self) -> i32 {
168 unsafe {
169 let __receiver = <ProfilingSampler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
170 ::unity::il2cpp_call!((::unity::module_base()+0x30ad230usize)as*mut u8,i32;
171(ProfilingSampler)__receiver)
172 }
173 }
174 #[doc = "`get_cpuElapsedTime()` overload"]
175 fn get_cpu_elapsed_time(self) -> f32 {
176 unsafe {
177 let __receiver = <ProfilingSampler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
178 ::unity::il2cpp_call!((::unity::module_base()+0x30ad280usize)as*mut u8,f32;
179(ProfilingSampler)__receiver)
180 }
181 }
182 #[doc = "`get_cpuSampleCount()` overload"]
183 fn get_cpu_sample_count(self) -> i32 {
184 unsafe {
185 let __receiver = <ProfilingSampler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
186 ::unity::il2cpp_call!((::unity::module_base()+0x30ad2e0usize)as*mut u8,i32;
187(ProfilingSampler)__receiver)
188 }
189 }
190 #[doc = "`get_inlineCpuElapsedTime()` overload"]
191 fn get_inline_cpu_elapsed_time(self) -> f32 {
192 unsafe {
193 let __receiver = <ProfilingSampler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
194 ::unity::il2cpp_call!((::unity::module_base()+0x30ad330usize)as*mut u8,f32;
195(ProfilingSampler)__receiver)
196 }
197 }
198 #[doc = "`get_inlineCpuSampleCount()` overload"]
199 fn get_inline_cpu_sample_count(self) -> i32 {
200 unsafe {
201 let __receiver = <ProfilingSampler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
202 ::unity::il2cpp_call!((::unity::module_base()+0x30ad390usize)as*mut u8,i32;
203(ProfilingSampler)__receiver)
204 }
205 }
206 #[doc = "`.ctor()` overload"]
207 fn ctor_2(self) -> () {
208 unsafe {
209 let __receiver = <ProfilingSampler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
210 ::unity::il2cpp_call!((::unity::module_base()+0x30ad3e0usize)as*mut u8,();
211(ProfilingSampler)__receiver)
212 }
213 }
214}
215
216#[cfg(feature = "unity_engine-rendering-profilingsampler")]
217impl<__T: IProfilingSampler> IProfilingSamplerMethods for __T {}
218
219#[cfg(feature = "unity_engine-rendering-profilingsampler")]
220impl ProfilingSampler {
221 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
222 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
223 }
224
225 pub fn begin_method_info() -> &'static ::unity::il2cpp::MethodInfo {
226 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
227 }
228
229 pub fn end_method_info() -> &'static ::unity::il2cpp::MethodInfo {
230 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
231 }
232
233 pub fn is_valid_method_info() -> &'static ::unity::il2cpp::MethodInfo {
234 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
235 }
236
237 pub fn get_sampler_method_info() -> &'static ::unity::il2cpp::MethodInfo {
238 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
239 }
240
241 pub fn set_sampler_method_info() -> &'static ::unity::il2cpp::MethodInfo {
242 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
243 }
244
245 pub fn get_inline_sampler_method_info() -> &'static ::unity::il2cpp::MethodInfo {
246 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
247 }
248
249 pub fn set_inline_sampler_method_info() -> &'static ::unity::il2cpp::MethodInfo {
250 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
251 }
252
253 pub fn get_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
254 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
255 }
256
257 pub fn set_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
258 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
259 }
260
261 pub fn set_enable_recording_method_info() -> &'static ::unity::il2cpp::MethodInfo {
262 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
263 }
264
265 pub fn get_gpu_elapsed_time_method_info() -> &'static ::unity::il2cpp::MethodInfo {
266 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
267 }
268
269 pub fn get_gpu_sample_count_method_info() -> &'static ::unity::il2cpp::MethodInfo {
270 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
271 }
272
273 pub fn get_cpu_elapsed_time_method_info() -> &'static ::unity::il2cpp::MethodInfo {
274 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
275 }
276
277 pub fn get_cpu_sample_count_method_info() -> &'static ::unity::il2cpp::MethodInfo {
278 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
279 }
280
281 pub fn get_inline_cpu_elapsed_time_method_info() -> &'static ::unity::il2cpp::MethodInfo {
282 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
283 }
284
285 pub fn get_inline_cpu_sample_count_method_info() -> &'static ::unity::il2cpp::MethodInfo {
286 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[17]
287 }
288
289 pub fn ctor_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
290 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[18]
291 }
292}
293
294#[cfg(feature = "unity_engine-rendering-profilingsampler")]
295impl ProfilingSampler {
296 #[doc = "`.ctor(::unity::Il2CppString)` — overload selector"]
297 pub fn new(name: ::unity::Il2CppString) -> Self {
298 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
299 panic!(
300 "{}
301::{}
302 failed to instantiate",
303 ::core::stringify!(ProfilingSampler),
304 ::core::stringify!(new),
305 )
306 });
307 <Self as IProfilingSamplerMethods>::ctor(this, name);
308 this
309 }
310
311 #[doc = "`.ctor()` — no args"]
312 pub fn new_2() -> Self {
313 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
314 panic!(
315 "{}
316::{}
317 failed to instantiate",
318 ::core::stringify!(ProfilingSampler),
319 ::core::stringify!(new_2),
320 )
321 });
322 <Self as IProfilingSamplerMethods>::ctor_2(this);
323 this
324 }
325}
326
327#[cfg(feature = "unity_engine-rendering-profilingsampler")]
328#[doc(hidden)]
329pub mod prelude {
330 pub use super::{IProfilingSampler, IProfilingSamplerMethods, ProfilingSampler};
331 pub use crate::system::object::IObject;
332 #[cfg(feature = "system-object")]
333 pub use crate::system::object::IObjectMethods;
334}