Skip to main content

engage/generated/unity_engine/resource_management/diagnostics/
diagnosticeventcollectorsingleton.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-resource_management-diagnostics-diagnosticeventcollectorsingleton-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::{
11            behaviour::{Behaviour, IBehaviour},
12            component::{Component, IComponent},
13            monobehaviour::{IMonoBehaviour, MonoBehaviour},
14            object_2::{IObject_2, Object_2},
15            resource_management::util::componentsingleton_1_2::{ComponentSingleton_1_2, IComponentSingleton_1_2},
16        },
17    };
18
19    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/resource_management/diagnostics/diagnosticeventcollectorsingleton/DiagnosticEventCollectorSingleton.md"))]
20    #[::unity::class(namespace = "UnityEngine.ResourceManagement.Diagnostics", name = "DiagnosticEventCollectorSingleton")]
21    #[parent(crate::unity_engine::resource_management::util::componentsingleton_1_2::ComponentSingleton_1_2<crate::unity_engine::resource_management::diagnostics::diagnosticeventcollectorsingleton::DiagnosticEventCollectorSingleton>)]
22    pub struct DiagnosticEventCollectorSingleton {
23        #[offset(24)]
24        #[rename(name = "m_CreatedEvents")]
25        pub m_created_events: crate::system::collections::generic::dictionary_2::Dictionary_2<
26            i32,
27            crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent,
28        >,
29        #[offset(32)]
30        #[rename(name = "m_UnhandledEvents")]
31        pub m_unhandled_events: crate::system::collections::generic::list_1::List_1<
32            crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent,
33        >,
34        #[offset(40)]
35        #[rename(name = "s_EventHandlers")]
36        pub s_event_handlers:
37            crate::root::delegatelist_1::DelegateList_1<crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent>,
38        #[offset(48)]
39        #[rename(name = "m_lastTickSent")]
40        pub m_last_tick_sent: f32,
41        #[offset(52)]
42        #[rename(name = "m_lastFrame")]
43        pub m_last_frame: i32,
44        #[offset(56)]
45        #[rename(name = "fpsAvg")]
46        pub fps_avg: f32,
47    }
48}
49
50#[cfg(feature = "unity_engine-resource_management-diagnostics-diagnosticeventcollectorsingleton-types")]
51pub use __types::*;
52
53#[cfg(feature = "unity_engine-resource_management-diagnostics-diagnosticeventcollectorsingleton")]
54#[doc(hidden)]
55#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
56mod __DiagnosticEventCollectorSingleton_unity_raw {
57    use super::*;
58    #[doc(hidden)]
59    #[allow(non_snake_case)]
60    pub mod __lookup_register_event_handler {
61        use super::*;
62        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
63            let param_types: &[& 'static::unity::il2cpp::Il2CppType]= &[<crate::system::action_1::Action_1<crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent>as::unity::IlType> ::il_type(), <bool as::unity::IlType> ::il_type(), <bool as::unity::IlType> ::il_type()];
64            ::unity::lookup::method_info_on_class_with_signature(
65                <DiagnosticEventCollectorSingleton as ::unity::ClassIdentity>::class(),
66                "RegisterEventHandler",
67                3,
68                param_types,
69                true,
70            )
71        });
72        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
73            match &*METHOD {
74                ::core::result::Result::Ok(mi) => *mi,
75                ::core::result::Result::Err(e) => {
76                    panic!(
77                        "method lookup failed: {}
78::{}
79: {}
80",
81                        <DiagnosticEventCollectorSingleton as ::unity::ClassIdentity>::NAME,
82                        "RegisterEventHandler",
83                        e
84                    )
85                },
86            }
87        }
88    }
89    #[doc(hidden)]
90    #[allow(non_snake_case)]
91    pub mod __lookup_register_event_handler_2 {
92        use super::*;
93        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
94            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[<crate::system::action_1::Action_1<
95                crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent,
96            > as ::unity::IlType>::il_type()];
97            ::unity::lookup::method_info_on_class_with_signature(
98                <DiagnosticEventCollectorSingleton as ::unity::ClassIdentity>::class(),
99                "RegisterEventHandler",
100                1,
101                param_types,
102                false,
103            )
104        });
105        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
106            match &*METHOD {
107                ::core::result::Result::Ok(mi) => *mi,
108                ::core::result::Result::Err(e) => {
109                    panic!(
110                        "method lookup failed: {}
111::{}
112: {}
113",
114                        <DiagnosticEventCollectorSingleton as ::unity::ClassIdentity>::NAME,
115                        "RegisterEventHandler",
116                        e
117                    )
118                },
119            }
120        }
121    }
122    #[doc(hidden)]
123    #[allow(non_snake_case)]
124    pub mod __lookup_unregister_event_handler {
125        use super::*;
126        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
127            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[<crate::system::action_1::Action_1<
128                crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent,
129            > as ::unity::IlType>::il_type()];
130            ::unity::lookup::method_info_on_class_with_signature(
131                <DiagnosticEventCollectorSingleton as ::unity::ClassIdentity>::class(),
132                "UnregisterEventHandler",
133                1,
134                param_types,
135                false,
136            )
137        });
138        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
139            match &*METHOD {
140                ::core::result::Result::Ok(mi) => *mi,
141                ::core::result::Result::Err(e) => {
142                    panic!(
143                        "method lookup failed: {}
144::{}
145: {}
146",
147                        <DiagnosticEventCollectorSingleton as ::unity::ClassIdentity>::NAME,
148                        "UnregisterEventHandler",
149                        e
150                    )
151                },
152            }
153        }
154    }
155    #[doc(hidden)]
156    #[allow(non_snake_case)]
157    pub mod __lookup_post_event {
158        use super::*;
159        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
160            let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
161                &[<crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent as ::unity::IlType>::il_type()];
162            ::unity::lookup::method_info_on_class_with_signature(
163                <DiagnosticEventCollectorSingleton as ::unity::ClassIdentity>::class(),
164                "PostEvent",
165                1,
166                param_types,
167                false,
168            )
169        });
170        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
171            match &*METHOD {
172                ::core::result::Result::Ok(mi) => *mi,
173                ::core::result::Result::Err(e) => {
174                    panic!(
175                        "method lookup failed: {}
176::{}
177: {}
178",
179                        <DiagnosticEventCollectorSingleton as ::unity::ClassIdentity>::NAME,
180                        "PostEvent",
181                        e
182                    )
183                },
184            }
185        }
186    }
187    #[doc(hidden)]
188    #[allow(non_snake_case)]
189    pub mod __lookup_awake {
190        use super::*;
191        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
192            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
193            ::unity::lookup::method_info_on_class_with_signature(
194                <DiagnosticEventCollectorSingleton as ::unity::ClassIdentity>::class(),
195                "Awake",
196                0,
197                param_types,
198                false,
199            )
200        });
201        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
202            match &*METHOD {
203                ::core::result::Result::Ok(mi) => *mi,
204                ::core::result::Result::Err(e) => {
205                    panic!(
206                        "method lookup failed: {}
207::{}
208: {}
209",
210                        <DiagnosticEventCollectorSingleton as ::unity::ClassIdentity>::NAME,
211                        "Awake",
212                        e
213                    )
214                },
215            }
216        }
217    }
218    #[doc(hidden)]
219    #[allow(non_snake_case)]
220    pub mod __lookup_update {
221        use super::*;
222        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
223            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
224            ::unity::lookup::method_info_on_class_with_signature(
225                <DiagnosticEventCollectorSingleton as ::unity::ClassIdentity>::class(),
226                "Update",
227                0,
228                param_types,
229                false,
230            )
231        });
232        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
233            match &*METHOD {
234                ::core::result::Result::Ok(mi) => *mi,
235                ::core::result::Result::Err(e) => {
236                    panic!(
237                        "method lookup failed: {}
238::{}
239: {}
240",
241                        <DiagnosticEventCollectorSingleton as ::unity::ClassIdentity>::NAME,
242                        "Update",
243                        e
244                    )
245                },
246            }
247        }
248    }
249    #[doc(hidden)]
250    #[allow(non_snake_case)]
251    pub mod __lookup_ctor {
252        use super::*;
253        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
254            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[];
255            ::unity::lookup::method_info_on_class_with_signature(
256                <DiagnosticEventCollectorSingleton as ::unity::ClassIdentity>::class(),
257                ".ctor",
258                0,
259                param_types,
260                false,
261            )
262        });
263        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
264            match &*METHOD {
265                ::core::result::Result::Ok(mi) => *mi,
266                ::core::result::Result::Err(e) => {
267                    panic!(
268                        "method lookup failed: {}
269::{}
270: {}
271",
272                        <DiagnosticEventCollectorSingleton as ::unity::ClassIdentity>::NAME,
273                        ".ctor",
274                        e
275                    )
276                },
277            }
278        }
279    }
280}
281
282#[cfg(feature = "unity_engine-resource_management-diagnostics-diagnosticeventcollectorsingleton")]
283impl DiagnosticEventCollectorSingleton {
284    #[doc = "`RegisterEventHandler(crate::system::action_1::Action_1<crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent>, bool, bool)` overload"]
285    pub fn register_event_handler(
286        handler: impl ::core::convert::Into<
287            crate::system::action_1::Action_1<crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent>,
288        >,
289        register: impl ::core::convert::Into<bool>,
290        create: impl ::core::convert::Into<bool>,
291    ) -> bool {
292        unsafe {
293            ::unity::il2cpp_call!(__DiagnosticEventCollectorSingleton_unity_raw::__lookup_register_event_handler::get_method_info().method_ptr,bool;
294(crate::system::action_1::Action_1<crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent>)::core::convert::Into::into(handler),(bool)::core::convert::Into::into(register),(bool)::core::convert::Into::into(create))
295        }
296    }
297}
298
299#[cfg(feature = "unity_engine-resource_management-diagnostics-diagnosticeventcollectorsingleton")]
300pub trait IDiagnosticEventCollectorSingletonMethods: IDiagnosticEventCollectorSingleton {
301    #[doc = "`GetGameObjectName()` overload"]
302    fn get_game_object_name(self) -> ::unity::Il2CppString {
303        unsafe {
304            let __receiver =
305                <DiagnosticEventCollectorSingleton as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
306            {
307                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
308                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
309                    panic!(
310                        "unity: virtual slot {}
311 out of range (vtable len {}
312) on the runtime class behind {}
313 (method `{}
314`)",
315                        4usize,
316                        __vt.len(),
317                        <DiagnosticEventCollectorSingleton as ::unity::ClassIdentity>::NAME,
318                        "GetGameObjectName",
319                    )
320                });
321                let __inner: extern "C" fn(DiagnosticEventCollectorSingleton, ::unity::OptionalMethod) -> ::unity::Il2CppString =
322                    ::core::mem::transmute(__vi.method_ptr);
323                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
324                __inner(__receiver, __mi)
325            }
326        }
327    }
328    #[doc = "`RegisterEventHandler(crate::system::action_1::Action_1<crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent>)` overload"]
329    fn register_event_handler_2(
330        self,
331        handler: impl ::core::convert::Into<
332            crate::system::action_1::Action_1<crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent>,
333        >,
334    ) -> () {
335        unsafe {
336            let __receiver =
337                <DiagnosticEventCollectorSingleton as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
338            ::unity::il2cpp_call!(__DiagnosticEventCollectorSingleton_unity_raw::__lookup_register_event_handler_2::get_method_info().method_ptr,();
339(DiagnosticEventCollectorSingleton)__receiver,(crate::system::action_1::Action_1<crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent>)::core::convert::Into::into(handler))
340        }
341    }
342    #[doc = "`UnregisterEventHandler(crate::system::action_1::Action_1<crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent>)` overload"]
343    fn unregister_event_handler(
344        self,
345        handler: impl ::core::convert::Into<
346            crate::system::action_1::Action_1<crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent>,
347        >,
348    ) -> () {
349        unsafe {
350            let __receiver =
351                <DiagnosticEventCollectorSingleton as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
352            ::unity::il2cpp_call!(__DiagnosticEventCollectorSingleton_unity_raw::__lookup_unregister_event_handler::get_method_info().method_ptr,();
353(DiagnosticEventCollectorSingleton)__receiver,(crate::system::action_1::Action_1<crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent>)::core::convert::Into::into(handler))
354        }
355    }
356    #[doc = "`PostEvent(crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent)` overload"]
357    fn post_event(
358        self,
359        diagnostic_event: impl ::core::convert::Into<crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent>,
360    ) -> () {
361        unsafe {
362            let __receiver =
363                <DiagnosticEventCollectorSingleton as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
364            ::unity::il2cpp_call!(__DiagnosticEventCollectorSingleton_unity_raw::__lookup_post_event::get_method_info().method_ptr,();
365(DiagnosticEventCollectorSingleton)__receiver,(crate::unity_engine::resource_management::diagnostics::diagnosticevent::DiagnosticEvent)::core::convert::Into::into(diagnostic_event))
366        }
367    }
368    #[doc = "`Awake()` overload"]
369    fn awake(self) -> () {
370        unsafe {
371            let __receiver =
372                <DiagnosticEventCollectorSingleton as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
373            ::unity::il2cpp_call!(__DiagnosticEventCollectorSingleton_unity_raw::__lookup_awake::get_method_info().method_ptr,();
374(DiagnosticEventCollectorSingleton)__receiver)
375        }
376    }
377    #[doc = "`Update()` overload"]
378    fn update(self) -> () {
379        unsafe {
380            let __receiver =
381                <DiagnosticEventCollectorSingleton as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
382            ::unity::il2cpp_call!(__DiagnosticEventCollectorSingleton_unity_raw::__lookup_update::get_method_info().method_ptr,();
383(DiagnosticEventCollectorSingleton)__receiver)
384        }
385    }
386    #[doc = "`.ctor()` overload"]
387    fn ctor(self) -> () {
388        unsafe {
389            let __receiver =
390                <DiagnosticEventCollectorSingleton as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
391            ::unity::il2cpp_call!(__DiagnosticEventCollectorSingleton_unity_raw::__lookup_ctor::get_method_info().method_ptr,();
392(DiagnosticEventCollectorSingleton)__receiver)
393        }
394    }
395}
396
397#[cfg(feature = "unity_engine-resource_management-diagnostics-diagnosticeventcollectorsingleton")]
398impl<__T: IDiagnosticEventCollectorSingleton> IDiagnosticEventCollectorSingletonMethods for __T {}
399
400#[cfg(feature = "unity_engine-resource_management-diagnostics-diagnosticeventcollectorsingleton")]
401impl DiagnosticEventCollectorSingleton {
402    pub fn get_game_object_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
403        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
404    }
405
406    pub fn register_event_handler_method_info() -> &'static ::unity::il2cpp::MethodInfo {
407        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
408    }
409
410    pub fn register_event_handler_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
411        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
412    }
413
414    pub fn unregister_event_handler_method_info() -> &'static ::unity::il2cpp::MethodInfo {
415        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
416    }
417
418    pub fn post_event_method_info() -> &'static ::unity::il2cpp::MethodInfo {
419        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
420    }
421
422    pub fn awake_method_info() -> &'static ::unity::il2cpp::MethodInfo {
423        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
424    }
425
426    pub fn update_method_info() -> &'static ::unity::il2cpp::MethodInfo {
427        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
428    }
429
430    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
431        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
432    }
433}
434
435#[cfg(feature = "unity_engine-resource_management-diagnostics-diagnosticeventcollectorsingleton")]
436impl DiagnosticEventCollectorSingleton {
437    #[doc = "Direct (non-virtual) call to `DiagnosticEventCollectorSingleton`'s own `GetGameObjectName`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
438    pub unsafe fn get_game_object_name(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
439        let __mi = Self::get_game_object_name_method_info();
440        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
441        __inner(this.into(), ::core::option::Option::None)
442    }
443}
444
445#[cfg(feature = "unity_engine-resource_management-diagnostics-diagnosticeventcollectorsingleton")]
446impl DiagnosticEventCollectorSingleton {
447    #[doc = "`.ctor()` — no args"]
448    pub fn new() -> Self {
449        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
450            panic!(
451                "{}
452::{}
453 failed to instantiate",
454                ::core::stringify!(DiagnosticEventCollectorSingleton),
455                ::core::stringify!(new),
456            )
457        });
458        <Self as IDiagnosticEventCollectorSingletonMethods>::ctor(this);
459        this
460    }
461}
462
463#[cfg(feature = "unity_engine-resource_management-diagnostics-diagnosticeventcollectorsingleton")]
464#[doc(hidden)]
465pub mod prelude {
466    pub use super::{DiagnosticEventCollectorSingleton, IDiagnosticEventCollectorSingleton, IDiagnosticEventCollectorSingletonMethods};
467    #[cfg(feature = "system-object")]
468    pub use crate::system::object::IObjectMethods;
469    #[cfg(feature = "unity_engine-behaviour")]
470    pub use crate::unity_engine::behaviour::IBehaviourMethods;
471    #[cfg(feature = "unity_engine-component")]
472    pub use crate::unity_engine::component::IComponentMethods;
473    #[cfg(feature = "unity_engine-monobehaviour")]
474    pub use crate::unity_engine::monobehaviour::IMonoBehaviourMethods;
475    #[cfg(feature = "unity_engine-object_2")]
476    pub use crate::unity_engine::object_2::IObject_2Methods;
477    #[cfg(feature = "unity_engine-resource_management-util-componentsingleton_1_2")]
478    pub use crate::unity_engine::resource_management::util::componentsingleton_1_2::IComponentSingleton_1_2Methods;
479    pub use crate::{
480        system::object::IObject,
481        unity_engine::{
482            behaviour::IBehaviour, component::IComponent, monobehaviour::IMonoBehaviour, object_2::IObject_2,
483            resource_management::util::componentsingleton_1_2::IComponentSingleton_1_2,
484        },
485    };
486}