Skip to content

IEventBus.Subscribe(Action) Method

Definition

Namespace: Brine2D.Events

Subscribes to events of type T and returns a disposal token that unsubscribes automatically when disposed. Prefer this overload to avoid stale subscriptions when scenes are unloaded.

System.IDisposable Subscribe<T>(System.Action<T> handler)
    where T : class;

Type parameters

T

Parameters

handler System.Action<T>

Returns

System.IDisposable