Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


UnregisterCallback

Remove callback from the instance.
Read time 2 minutesLast updated 10 days ago

Definition

UnregisterCallback<T>(EventCallback<T>, TrickleDown)

Remove callback from the instance.
public void UnregisterCallback<TEventType>(EventCallback<TEventType> callback, TrickleDown useTrickleDown = TrickleDown.NoTrickleDown) where TEventType : EventBase<TEventType>, new()

Parameters

The callback to remove. If this callback was never registered, nothing happens.

useTrickleDown

Set this parameter to true to remove the callback from the TrickleDown phase. Set this parameter to false to remove the callback from the BubbleUp phase.

Remarks

UnregisterCallback<T, U>(EventCallback<T, T>, TrickleDown)

Remove callback from the instance.
public void UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType> callback, TrickleDown useTrickleDown = TrickleDown.NoTrickleDown) where TEventType : EventBase<TEventType>, new()

Parameters

The callback to remove. If this callback was never registered, nothing happens.

useTrickleDown

Set this parameter to true to remove the callback from the TrickleDown phase. Set this parameter to false to remove the callback from the BubbleUp phase.

Remarks

UnregisterCallback<T>(EventCallback<T>, CallbackOptions)

Remove callback from the instance.
public void UnregisterCallback<TEventType>(EventCallback<TEventType> callback, CallbackOptions callbackOptions) where TEventType : EventBase<TEventType>, new()

Parameters

The callback to remove. If this callback was never registered, nothing happens.

callbackOptions

Extra properties to set for the callback. Make sure to use the same CallbackOptions.TrickleDown value as was used for registering the callback.

Remarks

UnregisterCallback<T, U>(EventCallback<T, T>, CallbackOptions)

Remove callback from the instance.
public void UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType> callback, CallbackOptions callbackOptions) where TEventType : EventBase<TEventType>, new()

Parameters

The callback to remove. If this callback was never registered, nothing happens.

callbackOptions

Extra properties to set for the callback. Make sure to use the same CallbackOptions.TrickleDown value as was used for registering the callback.

Remarks