engage/generated/unity_engine/events/
invokablecall_2.rs1#[cfg(feature = "unity_engine-events-invokablecall_2-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::baseinvokablecall::{BaseInvokableCall, IBaseInvokableCall},
11 };
12
13 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/events/invokablecall_2/InvokableCall_2.md"))]
14 #[::unity::class(namespace = "UnityEngine.Events", name = "InvokableCall`2")]
15 #[parent(crate::unity_engine::events::baseinvokablecall::BaseInvokableCall)]
16 #[parent(crate::system::object::Object)]
17 pub struct InvokableCall_2<T0: ::unity::ClassIdentity, T1: ::unity::ClassIdentity> {
18 #[rename(name = "Delegate")]
19 pub delegate: crate::unity_engine::events::unityaction_2::UnityAction_2<T0, T1>,
20 }
21}
22
23#[cfg(feature = "unity_engine-events-invokablecall_2-types")]
24pub use __types::*;
25
26#[cfg(feature = "unity_engine-events-invokablecall_2")]
27#[::unity::methods]
28impl<T0: ::unity::ClassIdentity, T1: ::unity::ClassIdentity> InvokableCall_2<T0, T1> {
29 #[doc = "`add_Delegate(crate::unity_engine::events::unityaction_2::UnityAction_2<T0,T1>)` overload"]
30 #[method(name = "add_Delegate", args = 1)]
31 pub fn add_delegate(self, value: crate::unity_engine::events::unityaction_2::UnityAction_2<T0, T1>) -> ();
32
33 #[doc = "`remove_Delegate(crate::unity_engine::events::unityaction_2::UnityAction_2<T0,T1>)` overload"]
34 #[method(name = "remove_Delegate", args = 1)]
35 pub fn remove_delegate(self, value: crate::unity_engine::events::unityaction_2::UnityAction_2<T0, T1>) -> ();
36
37 #[doc = "`.ctor(crate::system::object::Object, crate::system::reflection::methodinfo::MethodInfo)` overload"]
38 #[method(name = ".ctor", args = 2)]
39 pub fn ctor(self, target: crate::system::object::Object, the_function: crate::system::reflection::methodinfo::MethodInfo) -> ();
40
41 #[doc = "`.ctor(crate::unity_engine::events::unityaction_2::UnityAction_2<T0,T1>)` overload"]
42 #[method(name = ".ctor", args = 1)]
43 pub fn ctor_2(self, action: crate::unity_engine::events::unityaction_2::UnityAction_2<T0, T1>) -> ();
44
45 #[doc = "`Invoke(::unity::Array<crate::system::object::Object>)` overload"]
46 #[method(name = "Invoke", args = 1)]
47 pub fn invoke(self, args: ::unity::Array<crate::system::object::Object>) -> ();
48
49 #[doc = "`Invoke(T0, T1)` overload"]
50 #[method(name = "Invoke", args = 2)]
51 pub fn invoke_2(self, args0: T0, args1: T1) -> ();
52
53 #[doc = "`Find(crate::system::object::Object, crate::system::reflection::methodinfo::MethodInfo)` overload"]
54 #[method(name = "Find", args = 2)]
55 pub fn find(self, target_obj: crate::system::object::Object, method: crate::system::reflection::methodinfo::MethodInfo) -> bool;
56}
57
58#[cfg(feature = "unity_engine-events-invokablecall_2")]
59impl<T0: ::unity::ClassIdentity, T1: ::unity::ClassIdentity> InvokableCall_2<T0, T1> {
60 #[doc = "`.ctor(crate::system::object::Object, crate::system::reflection::methodinfo::MethodInfo)` — overload selector"]
61 pub fn new(target: crate::system::object::Object, the_function: crate::system::reflection::methodinfo::MethodInfo) -> Self {
62 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
63 panic!(
64 "{}
65::{}
66 failed to instantiate",
67 ::core::stringify!(InvokableCall_2),
68 ::core::stringify!(new),
69 )
70 });
71 <Self as IInvokableCall_2Methods<T0, T1>>::ctor(this, target, the_function);
72 this
73 }
74
75 #[doc = "`.ctor(crate::unity_engine::events::unityaction_2::UnityAction_2<T0,T1>)` — overload selector"]
76 pub fn new_2(action: crate::unity_engine::events::unityaction_2::UnityAction_2<T0, T1>) -> Self {
77 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
78 panic!(
79 "{}
80::{}
81 failed to instantiate",
82 ::core::stringify!(InvokableCall_2),
83 ::core::stringify!(new_2),
84 )
85 });
86 <Self as IInvokableCall_2Methods<T0, T1>>::ctor_2(this, action);
87 this
88 }
89}
90
91#[cfg(feature = "unity_engine-events-invokablecall_2")]
92#[doc(hidden)]
93pub mod prelude {
94 pub use super::{IInvokableCall_2, IInvokableCall_2Methods, InvokableCall_2};
95 #[cfg(feature = "system-object")]
96 pub use crate::system::object::IObjectMethods;
97 #[cfg(feature = "unity_engine-events-baseinvokablecall")]
98 pub use crate::unity_engine::events::baseinvokablecall::IBaseInvokableCallMethods;
99 pub use crate::{system::object::IObject, unity_engine::events::baseinvokablecall::IBaseInvokableCall};
100}