Skip to main content

engage/generated/unity_engine/
unityexception.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-unityexception-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8
9    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/unityexception/UnityException.md"))]
10    #[::unity::class(namespace = "UnityEngine", name = "UnityException")]
11    pub struct UnityException {}
12}
13
14#[cfg(feature = "unity_engine-unityexception-types")]
15pub use __types::*;
16
17#[cfg(feature = "unity_engine-unityexception")]
18pub trait IUnityExceptionMethods: IUnityException {
19    #[doc = "`.ctor()` overload"]
20    fn ctor(self) -> () {
21        unsafe {
22            let __receiver = <UnityException as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
23            ::unity::il2cpp_call!((::unity::module_base()+0x3794a20usize)as*mut u8,();
24(UnityException)__receiver)
25        }
26    }
27    #[doc = "`.ctor(::unity::Il2CppString)` overload"]
28    fn ctor_2(self, message: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
29        unsafe {
30            let __receiver = <UnityException as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
31            ::unity::il2cpp_call!((::unity::module_base()+0x3789ec0usize)as*mut u8,();
32(UnityException)__receiver,(::unity::Il2CppString)::core::convert::Into::into(message))
33        }
34    }
35}
36
37#[cfg(feature = "unity_engine-unityexception")]
38impl<__T: IUnityException> IUnityExceptionMethods for __T {}
39
40#[cfg(feature = "unity_engine-unityexception")]
41impl UnityException {
42    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
43        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
44    }
45
46    pub fn ctor_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
47        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
48    }
49}
50
51#[cfg(feature = "unity_engine-unityexception")]
52impl UnityException {
53    #[doc = "`.ctor()` — no args"]
54    pub fn new() -> Self {
55        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
56            panic!(
57                "{}
58::{}
59 failed to instantiate",
60                ::core::stringify!(UnityException),
61                ::core::stringify!(new),
62            )
63        });
64        <Self as IUnityExceptionMethods>::ctor(this);
65        this
66    }
67
68    #[doc = "`.ctor(::unity::Il2CppString)` — overload selector"]
69    pub fn new_2(message: ::unity::Il2CppString) -> Self {
70        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
71            panic!(
72                "{}
73::{}
74 failed to instantiate",
75                ::core::stringify!(UnityException),
76                ::core::stringify!(new_2),
77            )
78        });
79        <Self as IUnityExceptionMethods>::ctor_2(this, message);
80        this
81    }
82}
83
84#[cfg(feature = "unity_engine-unityexception")]
85#[doc(hidden)]
86pub mod prelude {
87    pub use super::{IUnityException, IUnityExceptionMethods, UnityException};
88}