Skip to main content

engage/generated/system/
action.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "system-action-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::{
9        delegate::{Delegate, IDelegate},
10        multicastdelegate::{IMulticastDelegate, MulticastDelegate},
11        object::{IObject, Object},
12    };
13
14    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/action/Action.md"))]
15    #[::unity::class(namespace = "System", name = "Action")]
16    #[parent(crate::system::multicastdelegate::MulticastDelegate)]
17    pub struct Action {}
18}
19
20#[cfg(feature = "system-action-types")]
21pub use __types::*;
22
23#[cfg(feature = "system-action")]
24pub trait IActionMethods: IAction {
25    #[doc = "`.ctor(crate::system::object::Object, ::unity::IntPtr)` overload"]
26    fn ctor(self, object: impl ::core::convert::Into<crate::system::object::Object>, method: impl ::core::convert::Into<::unity::IntPtr>) -> () {
27        unsafe {
28            let __receiver = <Action as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
29            ::unity::il2cpp_call!((::unity::module_base()+0x33f4290usize)as*mut u8,();
30(Action)__receiver,(crate::system::object::Object)::core::convert::Into::into(object),(::unity::IntPtr)::core::convert::Into::into(method))
31        }
32    }
33    #[doc = "`Invoke()` overload"]
34    fn invoke(self) -> () {
35        unsafe {
36            let __receiver = <Action as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
37            {
38                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
39                let __vi = *__vt.get(13usize).unwrap_or_else(|| {
40                    panic!(
41                        "unity: virtual slot {}
42 out of range (vtable len {}
43) on the runtime class behind {}
44 (method `{}
45`)",
46                        13usize,
47                        __vt.len(),
48                        <Action as ::unity::ClassIdentity>::NAME,
49                        "Invoke",
50                    )
51                });
52                let __inner: extern "C" fn(Action, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
53                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
54                __inner(__receiver, __mi)
55            }
56        }
57    }
58}
59
60#[cfg(feature = "system-action")]
61impl<__T: IAction> IActionMethods for __T {}
62
63#[cfg(feature = "system-action")]
64impl Action {
65    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
66        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
67    }
68
69    pub fn invoke_method_info() -> &'static ::unity::il2cpp::MethodInfo {
70        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
71    }
72}
73
74#[cfg(feature = "system-action")]
75impl Action {
76    #[doc = "Direct (non-virtual) call to `Action`'s own `Invoke`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
77    pub unsafe fn invoke(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
78        let __mi = Self::invoke_method_info();
79        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
80        __inner(this.into(), ::core::option::Option::None)
81    }
82}
83
84#[cfg(feature = "system-action")]
85impl Action {
86    #[doc = "`.ctor(crate::system::object::Object, ::unity::IntPtr)` — overload selector"]
87    pub fn new(object: crate::system::object::Object, method: ::unity::IntPtr) -> Self {
88        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
89            panic!(
90                "{}
91::{}
92 failed to instantiate",
93                ::core::stringify!(Action),
94                ::core::stringify!(new),
95            )
96        });
97        <Self as IActionMethods>::ctor(this, object, method);
98        this
99    }
100}
101
102#[cfg(feature = "system-action")]
103#[doc(hidden)]
104pub mod prelude {
105    pub use super::{Action, IAction, IActionMethods};
106    #[cfg(feature = "system-delegate")]
107    pub use crate::system::delegate::IDelegateMethods;
108    #[cfg(feature = "system-multicastdelegate")]
109    pub use crate::system::multicastdelegate::IMulticastDelegateMethods;
110    #[cfg(feature = "system-object")]
111    pub use crate::system::object::IObjectMethods;
112    pub use crate::system::{delegate::IDelegate, multicastdelegate::IMulticastDelegate, object::IObject};
113}