Skip to main content

engage/generated/unity_engine/profiling/
recorder.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-profiling-recorder-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/profiling/recorder/Recorder.md"))]
11    #[::unity::class(namespace = "UnityEngine.Profiling", name = "Recorder")]
12    #[parent(crate::system::object::Object)]
13    pub struct Recorder {
14        #[offset(16)]
15        #[rename(name = "m_Ptr")]
16        pub m_ptr: ::unity::IntPtr,
17        #[static_field]
18        #[rename(name = "s_InvalidRecorder")]
19        pub s_invalid_recorder: crate::unity_engine::profiling::recorder::Recorder,
20    }
21}
22
23#[cfg(feature = "unity_engine-profiling-recorder-types")]
24pub use __types::*;
25
26#[cfg(feature = "unity_engine-profiling-recorder")]
27impl Recorder {
28    #[doc = "`DisposeNative(::unity::IntPtr)` overload"]
29    pub fn dispose_native(ptr: impl ::core::convert::Into<::unity::IntPtr>) -> () {
30        unsafe {
31            ::unity::il2cpp_call!((::unity::module_base()+0x2f7a620usize)as*mut u8,();
32(::unity::IntPtr)::core::convert::Into::into(ptr))
33        }
34    }
35
36    #[doc = "`.cctor()` overload"]
37    pub fn cctor() -> () {
38        unsafe {
39            ::unity::il2cpp_call!((::unity::module_base()+0x2f7ac60usize)as*mut u8,();
40            )
41        }
42    }
43}
44
45#[cfg(feature = "unity_engine-profiling-recorder")]
46pub trait IRecorderMethods: IRecorder {
47    #[doc = "`.ctor()` overload"]
48    fn ctor(self) -> () {
49        unsafe {
50            let __receiver = <Recorder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
51            ::unity::il2cpp_call!((::unity::module_base()+0x2f7a4e0usize)as*mut u8,();
52(Recorder)__receiver)
53        }
54    }
55    #[doc = "`.ctor(::unity::IntPtr)` overload"]
56    fn ctor_2(self, ptr: impl ::core::convert::Into<::unity::IntPtr>) -> () {
57        unsafe {
58            let __receiver = <Recorder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
59            ::unity::il2cpp_call!((::unity::module_base()+0x2f7a4f0usize)as*mut u8,();
60(Recorder)__receiver,(::unity::IntPtr)::core::convert::Into::into(ptr))
61        }
62    }
63    #[doc = "`Finalize()` overload"]
64    fn finalize(self) -> () {
65        unsafe {
66            let __receiver = <Recorder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
67            {
68                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
69                let __vi = *__vt.get(1usize).unwrap_or_else(|| {
70                    panic!(
71                        "unity: virtual slot {}
72 out of range (vtable len {}
73) on the runtime class behind {}
74 (method `{}
75`)",
76                        1usize,
77                        __vt.len(),
78                        <Recorder as ::unity::ClassIdentity>::NAME,
79                        "Finalize",
80                    )
81                });
82                let __inner: extern "C" fn(Recorder, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
83                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
84                __inner(__receiver, __mi)
85            }
86        }
87    }
88    #[doc = "`get_isValid()` overload"]
89    fn get_is_valid(self) -> bool {
90        unsafe {
91            let __receiver = <Recorder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
92            ::unity::il2cpp_call!((::unity::module_base()+0x2f7a670usize)as*mut u8,bool;
93(Recorder)__receiver)
94        }
95    }
96    #[doc = "`get_enabled()` overload"]
97    fn get_enabled(self) -> bool {
98        unsafe {
99            let __receiver = <Recorder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
100            ::unity::il2cpp_call!((::unity::module_base()+0x2f7a6c0usize)as*mut u8,bool;
101(Recorder)__receiver)
102        }
103    }
104    #[doc = "`set_enabled(bool)` overload"]
105    fn set_enabled(self, value: impl ::core::convert::Into<bool>) -> () {
106        unsafe {
107            let __receiver = <Recorder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
108            ::unity::il2cpp_call!((::unity::module_base()+0x2f7a7b0usize)as*mut u8,();
109(Recorder)__receiver,(bool)::core::convert::Into::into(value))
110        }
111    }
112    #[doc = "`IsEnabled()` overload"]
113    fn is_enabled(self) -> bool {
114        unsafe {
115            let __receiver = <Recorder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
116            ::unity::il2cpp_call!((::unity::module_base()+0x2f7a760usize)as*mut u8,bool;
117(Recorder)__receiver)
118        }
119    }
120    #[doc = "`get_elapsedNanoseconds()` overload"]
121    fn get_elapsed_nanoseconds(self) -> i64 {
122        unsafe {
123            let __receiver = <Recorder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
124            ::unity::il2cpp_call!((::unity::module_base()+0x2f7a8a0usize)as*mut u8,i64;
125(Recorder)__receiver)
126        }
127    }
128    #[doc = "`get_gpuElapsedNanoseconds()` overload"]
129    fn get_gpu_elapsed_nanoseconds(self) -> i64 {
130        unsafe {
131            let __receiver = <Recorder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
132            ::unity::il2cpp_call!((::unity::module_base()+0x2f7a990usize)as*mut u8,i64;
133(Recorder)__receiver)
134        }
135    }
136    #[doc = "`get_sampleBlockCount()` overload"]
137    fn get_sample_block_count(self) -> i32 {
138        unsafe {
139            let __receiver = <Recorder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
140            ::unity::il2cpp_call!((::unity::module_base()+0x2f7aa80usize)as*mut u8,i32;
141(Recorder)__receiver)
142        }
143    }
144    #[doc = "`get_gpuSampleBlockCount()` overload"]
145    fn get_gpu_sample_block_count(self) -> i32 {
146        unsafe {
147            let __receiver = <Recorder as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
148            ::unity::il2cpp_call!((::unity::module_base()+0x2f7ab70usize)as*mut u8,i32;
149(Recorder)__receiver)
150        }
151    }
152}
153
154#[cfg(feature = "unity_engine-profiling-recorder")]
155impl<__T: IRecorder> IRecorderMethods for __T {}
156
157#[cfg(feature = "unity_engine-profiling-recorder")]
158impl Recorder {
159    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
160        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
161    }
162
163    pub fn ctor_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
164        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
165    }
166
167    pub fn finalize_method_info() -> &'static ::unity::il2cpp::MethodInfo {
168        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
169    }
170
171    pub fn get_is_valid_method_info() -> &'static ::unity::il2cpp::MethodInfo {
172        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
173    }
174
175    pub fn dispose_native_method_info() -> &'static ::unity::il2cpp::MethodInfo {
176        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
177    }
178
179    pub fn get_enabled_method_info() -> &'static ::unity::il2cpp::MethodInfo {
180        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
181    }
182
183    pub fn set_enabled_method_info() -> &'static ::unity::il2cpp::MethodInfo {
184        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
185    }
186
187    pub fn is_enabled_method_info() -> &'static ::unity::il2cpp::MethodInfo {
188        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
189    }
190
191    pub fn get_elapsed_nanoseconds_method_info() -> &'static ::unity::il2cpp::MethodInfo {
192        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
193    }
194
195    pub fn get_gpu_elapsed_nanoseconds_method_info() -> &'static ::unity::il2cpp::MethodInfo {
196        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
197    }
198
199    pub fn get_sample_block_count_method_info() -> &'static ::unity::il2cpp::MethodInfo {
200        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
201    }
202
203    pub fn get_gpu_sample_block_count_method_info() -> &'static ::unity::il2cpp::MethodInfo {
204        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
205    }
206
207    pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
208        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[17]
209    }
210}
211
212#[cfg(feature = "unity_engine-profiling-recorder")]
213impl Recorder {
214    #[doc = "Direct (non-virtual) call to `Recorder`'s own `Finalize`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
215    pub unsafe fn finalize(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
216        let __mi = Self::finalize_method_info();
217        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
218        __inner(this.into(), ::core::option::Option::None)
219    }
220}
221
222#[cfg(feature = "unity_engine-profiling-recorder")]
223impl Recorder {
224    #[doc = "`.ctor()` — no args"]
225    pub fn new() -> Self {
226        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
227            panic!(
228                "{}
229::{}
230 failed to instantiate",
231                ::core::stringify!(Recorder),
232                ::core::stringify!(new),
233            )
234        });
235        <Self as IRecorderMethods>::ctor(this);
236        this
237    }
238
239    #[doc = "`.ctor(::unity::IntPtr)` — overload selector"]
240    pub fn new_2(ptr: ::unity::IntPtr) -> Self {
241        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
242            panic!(
243                "{}
244::{}
245 failed to instantiate",
246                ::core::stringify!(Recorder),
247                ::core::stringify!(new_2),
248            )
249        });
250        <Self as IRecorderMethods>::ctor_2(this, ptr);
251        this
252    }
253}
254
255#[cfg(feature = "unity_engine-profiling-recorder")]
256#[doc(hidden)]
257pub mod prelude {
258    pub use super::{IRecorder, IRecorderMethods, Recorder};
259    pub use crate::system::object::IObject;
260    #[cfg(feature = "system-object")]
261    pub use crate::system::object::IObjectMethods;
262}