engage/generated/unity_engine/profiling/
sampler.rs1#[cfg(feature = "unity_engine-profiling-sampler-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/sampler/Sampler.md"))]
11 #[::unity::class(namespace = "UnityEngine.Profiling", name = "Sampler")]
12 #[parent(crate::system::object::Object)]
13 pub struct Sampler {
14 #[offset(16)]
15 #[rename(name = "m_Ptr")]
16 pub m_ptr: ::unity::IntPtr,
17 #[static_field]
18 #[rename(name = "s_InvalidSampler")]
19 pub s_invalid_sampler: crate::unity_engine::profiling::sampler::Sampler,
20 }
21}
22
23#[cfg(feature = "unity_engine-profiling-sampler-types")]
24pub use __types::*;
25
26#[cfg(feature = "unity_engine-profiling-sampler")]
27impl Sampler {
28 #[doc = "`GetRecorderInternal(::unity::IntPtr)` overload"]
29 pub fn get_recorder_internal(ptr: impl ::core::convert::Into<::unity::IntPtr>) -> ::unity::IntPtr {
30 unsafe {
31 ::unity::il2cpp_call!((::unity::module_base()+0x2f89ad0usize)as*mut u8, ::unity::IntPtr;
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()+0x2f89b20usize)as*mut u8,();
40 )
41 }
42 }
43}
44
45#[cfg(feature = "unity_engine-profiling-sampler")]
46pub trait ISamplerMethods: ISampler {
47 #[doc = "`.ctor()` overload"]
48 fn ctor(self) -> () {
49 unsafe {
50 let __receiver = <Sampler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
51 ::unity::il2cpp_call!((::unity::module_base()+0x2f89960usize)as*mut u8,();
52(Sampler)__receiver)
53 }
54 }
55 #[doc = "`get_isValid()` overload"]
56 fn get_is_valid(self) -> bool {
57 unsafe {
58 let __receiver = <Sampler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
59 ::unity::il2cpp_call!((::unity::module_base()+0x2f89970usize)as*mut u8,bool;
60(Sampler)__receiver)
61 }
62 }
63 #[doc = "`GetRecorder()` overload"]
64 fn get_recorder(self) -> crate::unity_engine::profiling::recorder::Recorder {
65 unsafe {
66 let __receiver = <Sampler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
67 ::unity::il2cpp_call!((::unity::module_base()+0x2f899c0usize)as*mut u8,crate::unity_engine::profiling::recorder::Recorder;
68(Sampler)__receiver)
69 }
70 }
71}
72
73#[cfg(feature = "unity_engine-profiling-sampler")]
74impl<__T: ISampler> ISamplerMethods for __T {}
75
76#[cfg(feature = "unity_engine-profiling-sampler")]
77impl Sampler {
78 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
79 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
80 }
81
82 pub fn get_is_valid_method_info() -> &'static ::unity::il2cpp::MethodInfo {
83 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
84 }
85
86 pub fn get_recorder_method_info() -> &'static ::unity::il2cpp::MethodInfo {
87 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
88 }
89
90 pub fn get_recorder_internal_method_info() -> &'static ::unity::il2cpp::MethodInfo {
91 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
92 }
93
94 pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
95 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
96 }
97}
98
99#[cfg(feature = "unity_engine-profiling-sampler")]
100impl Sampler {
101 #[doc = "`.ctor()` — no args"]
102 pub fn new() -> Self {
103 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
104 panic!(
105 "{}
106::{}
107 failed to instantiate",
108 ::core::stringify!(Sampler),
109 ::core::stringify!(new),
110 )
111 });
112 <Self as ISamplerMethods>::ctor(this);
113 this
114 }
115}
116
117#[cfg(feature = "unity_engine-profiling-sampler")]
118#[doc(hidden)]
119pub mod prelude {
120 pub use super::{ISampler, ISamplerMethods, Sampler};
121 pub use crate::system::object::IObject;
122 #[cfg(feature = "system-object")]
123 pub use crate::system::object::IObjectMethods;
124}