engage/generated/unity_engine/
androidjavaexception.rs1#[cfg(feature = "unity_engine-androidjavaexception-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/androidjavaexception/AndroidJavaException.md"))]
10 #[::unity::class(namespace = "UnityEngine", name = "AndroidJavaException")]
11 pub struct AndroidJavaException {
12 #[offset(136)]
13 #[rename(name = "mJavaStackTrace")]
14 pub m_java_stack_trace: ::unity::Il2CppString,
15 }
16}
17
18#[cfg(feature = "unity_engine-androidjavaexception-types")]
19pub use __types::*;
20
21#[cfg(feature = "unity_engine-androidjavaexception")]
22pub trait IAndroidJavaExceptionMethods: IAndroidJavaException {
23 #[doc = "`.ctor(::unity::Il2CppString, ::unity::Il2CppString)` overload"]
24 fn ctor(
25 self,
26 message: impl ::core::convert::Into<::unity::Il2CppString>,
27 java_stack_trace: impl ::core::convert::Into<::unity::Il2CppString>,
28 ) -> () {
29 unsafe {
30 let __receiver = <AndroidJavaException as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
31 ::unity::il2cpp_call!((::unity::module_base()+0x3f0f920usize)as*mut u8,();
32(AndroidJavaException)__receiver,(::unity::Il2CppString)::core::convert::Into::into(message),(::unity::Il2CppString)::core::convert::Into::into(java_stack_trace))
33 }
34 }
35 #[doc = "`get_StackTrace()` overload"]
36 fn get_stack_trace(self) -> ::unity::Il2CppString {
37 unsafe {
38 let __receiver = <AndroidJavaException as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
39 {
40 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
41 let __vi = *__vt.get(10usize).unwrap_or_else(|| {
42 panic!(
43 "unity: virtual slot {}
44 out of range (vtable len {}
45) on the runtime class behind {}
46 (method `{}
47`)",
48 10usize,
49 __vt.len(),
50 <AndroidJavaException as ::unity::ClassIdentity>::NAME,
51 "get_StackTrace",
52 )
53 });
54 let __inner: extern "C" fn(AndroidJavaException, ::unity::OptionalMethod) -> ::unity::Il2CppString =
55 ::core::mem::transmute(__vi.method_ptr);
56 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
57 __inner(__receiver, __mi)
58 }
59 }
60 }
61}
62
63#[cfg(feature = "unity_engine-androidjavaexception")]
64impl<__T: IAndroidJavaException> IAndroidJavaExceptionMethods for __T {}
65
66#[cfg(feature = "unity_engine-androidjavaexception")]
67impl AndroidJavaException {
68 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
69 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
70 }
71
72 pub fn get_stack_trace_method_info() -> &'static ::unity::il2cpp::MethodInfo {
73 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
74 }
75}
76
77#[cfg(feature = "unity_engine-androidjavaexception")]
78impl AndroidJavaException {
79 #[doc = "Direct (non-virtual) call to `AndroidJavaException`'s own `get_StackTrace`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
80 pub unsafe fn get_stack_trace(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
81 let __mi = Self::get_stack_trace_method_info();
82 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
83 __inner(this.into(), ::core::option::Option::None)
84 }
85}
86
87#[cfg(feature = "unity_engine-androidjavaexception")]
88impl AndroidJavaException {
89 #[doc = "`.ctor(::unity::Il2CppString, ::unity::Il2CppString)` — overload selector"]
90 pub fn new(message: ::unity::Il2CppString, java_stack_trace: ::unity::Il2CppString) -> Self {
91 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
92 panic!(
93 "{}
94::{}
95 failed to instantiate",
96 ::core::stringify!(AndroidJavaException),
97 ::core::stringify!(new),
98 )
99 });
100 <Self as IAndroidJavaExceptionMethods>::ctor(this, message, java_stack_trace);
101 this
102 }
103}
104
105#[cfg(feature = "unity_engine-androidjavaexception")]
106#[doc(hidden)]
107pub mod prelude {
108 pub use super::{AndroidJavaException, IAndroidJavaException, IAndroidJavaExceptionMethods};
109}