Skip to main content

engage/generated/app/struct_object/
basepiece.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "app-struct_object-basepiece-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/app/struct_object/basepiece/BasePiece.md"))]
11    #[::unity::class(namespace = "App.StructObject", name = "BasePiece")]
12    #[parent(crate::system::object::Object)]
13    pub struct BasePiece {}
14}
15
16#[cfg(feature = "app-struct_object-basepiece-types")]
17pub use __types::*;
18
19#[cfg(feature = "app-struct_object-basepiece")]
20pub trait IBasePieceMethods: IBasePiece {
21    #[doc = "`Setup()` overload"]
22    fn setup(self) -> () {
23        unsafe {
24            let __receiver = <BasePiece as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
25            {
26                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
27                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
28                    panic!(
29                        "unity: virtual slot {}
30 out of range (vtable len {}
31) on the runtime class behind {}
32 (method `{}
33`)",
34                        4usize,
35                        __vt.len(),
36                        <BasePiece as ::unity::ClassIdentity>::NAME,
37                        "Setup",
38                    )
39                });
40                let __inner: extern "C" fn(BasePiece, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
41                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
42                __inner(__receiver, __mi)
43            }
44        }
45    }
46    #[doc = "`Cleanup()` overload"]
47    fn cleanup(self) -> () {
48        unsafe {
49            let __receiver = <BasePiece as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
50            {
51                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
52                let __vi = *__vt.get(5usize).unwrap_or_else(|| {
53                    panic!(
54                        "unity: virtual slot {}
55 out of range (vtable len {}
56) on the runtime class behind {}
57 (method `{}
58`)",
59                        5usize,
60                        __vt.len(),
61                        <BasePiece as ::unity::ClassIdentity>::NAME,
62                        "Cleanup",
63                    )
64                });
65                let __inner: extern "C" fn(BasePiece, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
66                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
67                __inner(__receiver, __mi)
68            }
69        }
70    }
71    #[doc = "`.ctor()` overload"]
72    fn ctor(self) -> () {
73        unsafe {
74            let __receiver = <BasePiece as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
75            ::unity::il2cpp_call!((::unity::module_base()+0x2452e70usize)as*mut u8,();
76(BasePiece)__receiver)
77        }
78    }
79}
80
81#[cfg(feature = "app-struct_object-basepiece")]
82impl<__T: IBasePiece> IBasePieceMethods for __T {}
83
84#[cfg(feature = "app-struct_object-basepiece")]
85impl BasePiece {
86    pub fn setup_method_info() -> &'static ::unity::il2cpp::MethodInfo {
87        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
88    }
89
90    pub fn cleanup_method_info() -> &'static ::unity::il2cpp::MethodInfo {
91        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
92    }
93
94    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
95        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
96    }
97}
98
99#[cfg(feature = "app-struct_object-basepiece")]
100impl BasePiece {
101    #[doc = "Direct (non-virtual) call to `BasePiece`'s own `Setup`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
102    pub unsafe fn setup(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
103        let __mi = Self::setup_method_info();
104        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
105        __inner(this.into(), ::core::option::Option::None)
106    }
107
108    #[doc = "Direct (non-virtual) call to `BasePiece`'s own `Cleanup`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
109    pub unsafe fn cleanup(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
110        let __mi = Self::cleanup_method_info();
111        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
112        __inner(this.into(), ::core::option::Option::None)
113    }
114}
115
116#[cfg(feature = "app-struct_object-basepiece")]
117impl BasePiece {
118    #[doc = "`.ctor()` — no args"]
119    pub fn new() -> Self {
120        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
121            panic!(
122                "{}
123::{}
124 failed to instantiate",
125                ::core::stringify!(BasePiece),
126                ::core::stringify!(new),
127            )
128        });
129        <Self as IBasePieceMethods>::ctor(this);
130        this
131    }
132}
133
134#[cfg(feature = "app-struct_object-basepiece")]
135#[doc(hidden)]
136pub mod prelude {
137    pub use super::{BasePiece, IBasePiece, IBasePieceMethods};
138    pub use crate::system::object::IObject;
139    #[cfg(feature = "system-object")]
140    pub use crate::system::object::IObjectMethods;
141}