Skip to main content

engage/generated/unity_engine/profiling/
customsampler.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-profiling-customsampler-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::{
9        system::object::{IObject, Object},
10        unity_engine::profiling::sampler::{ISampler, Sampler},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/profiling/customsampler/CustomSampler.md"))]
14    #[::unity::class(namespace = "UnityEngine.Profiling", name = "CustomSampler")]
15    #[parent(crate::unity_engine::profiling::sampler::Sampler)]
16    pub struct CustomSampler {
17        #[static_field]
18        #[rename(name = "s_InvalidCustomSampler")]
19        pub s_invalid_custom_sampler: crate::unity_engine::profiling::customsampler::CustomSampler,
20    }
21}
22
23#[cfg(feature = "unity_engine-profiling-customsampler-types")]
24pub use __types::*;
25
26#[cfg(feature = "unity_engine-profiling-customsampler")]
27impl CustomSampler {
28    #[doc = "`Create(::unity::Il2CppString, bool)` overload"]
29    pub fn create(
30        name: impl ::core::convert::Into<::unity::Il2CppString>,
31        collect_gpu_data: impl ::core::convert::Into<bool>,
32    ) -> crate::unity_engine::profiling::customsampler::CustomSampler {
33        unsafe {
34            ::unity::il2cpp_call!((::unity::module_base()+0x2c4a220usize)as*mut u8,crate::unity_engine::profiling::customsampler::CustomSampler;
35(::unity::Il2CppString)::core::convert::Into::into(name),(bool)::core::convert::Into::into(collect_gpu_data))
36        }
37    }
38
39    #[doc = "`CreateInternal(::unity::Il2CppString, bool)` overload"]
40    pub fn create_internal(
41        name: impl ::core::convert::Into<::unity::Il2CppString>,
42        collect_gpu_data: impl ::core::convert::Into<bool>,
43    ) -> ::unity::IntPtr {
44        unsafe {
45            ::unity::il2cpp_call!((::unity::module_base()+0x2c4a370usize)as*mut u8, ::unity::IntPtr;
46(::unity::Il2CppString)::core::convert::Into::into(name),(bool)::core::convert::Into::into(collect_gpu_data))
47        }
48    }
49
50    #[doc = "`.cctor()` overload"]
51    pub fn cctor() -> () {
52        unsafe {
53            ::unity::il2cpp_call!((::unity::module_base()+0x2c4a3c0usize)as*mut u8,();
54            )
55        }
56    }
57}
58
59#[cfg(feature = "unity_engine-profiling-customsampler")]
60pub trait ICustomSamplerMethods: ICustomSampler {
61    #[doc = "`.ctor()` overload"]
62    fn ctor(self) -> () {
63        unsafe {
64            let __receiver = <CustomSampler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
65            ::unity::il2cpp_call!((::unity::module_base()+0x2c4a130usize)as*mut u8,();
66(CustomSampler)__receiver)
67        }
68    }
69    #[doc = "`.ctor(::unity::IntPtr)` overload"]
70    fn ctor_2(self, ptr: impl ::core::convert::Into<::unity::IntPtr>) -> () {
71        unsafe {
72            let __receiver = <CustomSampler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
73            ::unity::il2cpp_call!((::unity::module_base()+0x2c4a1a0usize)as*mut u8,();
74(CustomSampler)__receiver,(::unity::IntPtr)::core::convert::Into::into(ptr))
75        }
76    }
77}
78
79#[cfg(feature = "unity_engine-profiling-customsampler")]
80impl<__T: ICustomSampler> ICustomSamplerMethods for __T {}
81
82#[cfg(feature = "unity_engine-profiling-customsampler")]
83impl CustomSampler {
84    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
85        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
86    }
87
88    pub fn ctor_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
89        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
90    }
91
92    pub fn create_method_info() -> &'static ::unity::il2cpp::MethodInfo {
93        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
94    }
95
96    pub fn create_internal_method_info() -> &'static ::unity::il2cpp::MethodInfo {
97        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
98    }
99
100    pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
101        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
102    }
103}
104
105#[cfg(feature = "unity_engine-profiling-customsampler")]
106impl CustomSampler {
107    #[doc = "`.ctor()` — no args"]
108    pub fn new() -> Self {
109        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
110            panic!(
111                "{}
112::{}
113 failed to instantiate",
114                ::core::stringify!(CustomSampler),
115                ::core::stringify!(new),
116            )
117        });
118        <Self as ICustomSamplerMethods>::ctor(this);
119        this
120    }
121
122    #[doc = "`.ctor(::unity::IntPtr)` — overload selector"]
123    pub fn new_2(ptr: ::unity::IntPtr) -> Self {
124        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
125            panic!(
126                "{}
127::{}
128 failed to instantiate",
129                ::core::stringify!(CustomSampler),
130                ::core::stringify!(new_2),
131            )
132        });
133        <Self as ICustomSamplerMethods>::ctor_2(this, ptr);
134        this
135    }
136}
137
138#[cfg(feature = "unity_engine-profiling-customsampler")]
139#[doc(hidden)]
140pub mod prelude {
141    pub use super::{CustomSampler, ICustomSampler, ICustomSamplerMethods};
142    #[cfg(feature = "system-object")]
143    pub use crate::system::object::IObjectMethods;
144    #[cfg(feature = "unity_engine-profiling-sampler")]
145    pub use crate::unity_engine::profiling::sampler::ISamplerMethods;
146    pub use crate::{system::object::IObject, unity_engine::profiling::sampler::ISampler};
147}