Skip to main content

engage/generated/unity_engine/events/
unityevent_1.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-events-unityevent_1-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::events::unityeventbase::{IUnityEventBase, UnityEventBase},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/events/unityevent_1/UnityEvent_1.md"))]
14    #[::unity::class(namespace = "UnityEngine.Events", name = "UnityEvent`1")]
15    #[parent(crate::unity_engine::events::unityeventbase::UnityEventBase)]
16    #[parent(crate::system::object::Object)]
17    pub struct UnityEvent_1<T0: ::unity::ClassIdentity> {
18        #[rename(name = "m_InvokeArray")]
19        pub m_invoke_array: ::unity::Array<crate::system::object::Object>,
20    }
21}
22
23#[cfg(feature = "unity_engine-events-unityevent_1-types")]
24pub use __types::*;
25
26#[cfg(feature = "unity_engine-events-unityevent_1")]
27#[::unity::methods]
28impl<T0: ::unity::ClassIdentity> UnityEvent_1<T0> {
29    #[doc = "`.ctor()` overload"]
30    #[method(name = ".ctor", args = 0)]
31    pub fn ctor(self) -> ();
32
33    #[doc = "`AddListener(crate::unity_engine::events::unityaction_1::UnityAction_1<T0>)` overload"]
34    #[method(name = "AddListener", args = 1)]
35    pub fn add_listener(self, call: crate::unity_engine::events::unityaction_1::UnityAction_1<T0>) -> ();
36
37    #[doc = "`RemoveListener(crate::unity_engine::events::unityaction_1::UnityAction_1<T0>)` overload"]
38    #[method(name = "RemoveListener", args = 1)]
39    pub fn remove_listener(self, call: crate::unity_engine::events::unityaction_1::UnityAction_1<T0>) -> ();
40
41    #[doc = "`FindMethod_Impl(::unity::Il2CppString, ::unity::SystemType)` overload"]
42    #[method(name = "FindMethod_Impl", args = 2)]
43    pub fn find_method_impl(
44        self,
45        name: ::unity::Il2CppString,
46        target_obj_type: ::unity::SystemType,
47    ) -> crate::system::reflection::methodinfo::MethodInfo;
48
49    #[doc = "`GetDelegate(crate::system::object::Object, crate::system::reflection::methodinfo::MethodInfo)` overload"]
50    #[method(name = "GetDelegate", args = 2)]
51    pub fn get_delegate(
52        self,
53        target: crate::system::object::Object,
54        the_function: crate::system::reflection::methodinfo::MethodInfo,
55    ) -> crate::unity_engine::events::baseinvokablecall::BaseInvokableCall;
56
57    #[doc = "`GetDelegate(crate::unity_engine::events::unityaction_1::UnityAction_1<T0>)` overload"]
58    #[method(name = "GetDelegate", args = 1)]
59    pub fn get_delegate_2(
60        action: crate::unity_engine::events::unityaction_1::UnityAction_1<T0>,
61    ) -> crate::unity_engine::events::baseinvokablecall::BaseInvokableCall;
62
63    #[doc = "`Invoke(T0)` overload"]
64    #[method(name = "Invoke", args = 1)]
65    pub fn invoke(self, arg0: T0) -> ();
66}
67
68#[cfg(feature = "unity_engine-events-unityevent_1")]
69impl<T0: ::unity::ClassIdentity> UnityEvent_1<T0> {
70    #[doc = "`.ctor()` — no args"]
71    pub fn new() -> Self {
72        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
73            panic!(
74                "{}
75::{}
76 failed to instantiate",
77                ::core::stringify!(UnityEvent_1),
78                ::core::stringify!(new),
79            )
80        });
81        <Self as IUnityEvent_1Methods<T0>>::ctor(this);
82        this
83    }
84}
85
86#[cfg(feature = "unity_engine-events-unityevent_1")]
87#[doc(hidden)]
88pub mod prelude {
89    pub use super::{IUnityEvent_1, IUnityEvent_1Methods, UnityEvent_1};
90    #[cfg(feature = "system-object")]
91    pub use crate::system::object::IObjectMethods;
92    #[cfg(feature = "unity_engine-events-unityeventbase")]
93    pub use crate::unity_engine::events::unityeventbase::IUnityEventBaseMethods;
94    pub use crate::{system::object::IObject, unity_engine::events::unityeventbase::IUnityEventBase};
95}