Skip to main content

IUnityEventMethods

Trait IUnityEventMethods 

Source
pub trait IUnityEventMethods: IUnityEvent {
    // Provided methods
    fn ctor(self) { ... }
    fn add_listener(self, call: impl Into<UnityAction>) { ... }
    fn remove_listener(self, call: impl Into<UnityAction>) { ... }
    fn find_method_impl(
        self,
        name: impl Into<Il2CppString>,
        target_obj_type: impl Into<SystemType>,
    ) -> MethodInfo { ... }
    fn get_delegate(
        self,
        target: impl Into<Object>,
        the_function: impl Into<MethodInfo>,
    ) -> BaseInvokableCall { ... }
    fn invoke(self) { ... }
}

Provided Methods§

Source

fn ctor(self)

.ctor() overload

Source

fn add_listener(self, call: impl Into<UnityAction>)

AddListener(crate::unity_engine::events::unityaction::UnityAction) overload

Source

fn remove_listener(self, call: impl Into<UnityAction>)

RemoveListener(crate::unity_engine::events::unityaction::UnityAction) overload

Source

fn find_method_impl( self, name: impl Into<Il2CppString>, target_obj_type: impl Into<SystemType>, ) -> MethodInfo

FindMethod_Impl(::unity::Il2CppString, ::unity::SystemType) overload

Source

fn get_delegate( self, target: impl Into<Object>, the_function: impl Into<MethodInfo>, ) -> BaseInvokableCall

GetDelegate(crate::system::object::Object, crate::system::reflection::methodinfo::MethodInfo) overload

Source

fn invoke(self)

Invoke() overload

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<__T: IUnityEvent> IUnityEventMethods for __T

Available on crate feature unity_engine-events-unityevent only.