Synced
EventHub.ListenOnce
Section titled “EventHub.ListenOnce”
- Subscribes a one-shot listener for the specified event type.
Required contracts
Section titled “Required contracts”API: scripting
Project: Inno.Core.Events
Scope: Runtime
Declaration
Section titled “Declaration”public System.IDisposable InnoEngine.Events.EventHub.ListenOnce<TEvent>(System.Action<TEvent> handler, int priority = 0) where TEvent : InnoEngine.Events.EventType parameters
Section titled “Type parameters”Type parameter TEvent: Event type to listen for.
Parameters
Section titled “Parameters”Parameter handler: Listener callback.
Parameter priority: Listener priority within the selected event type’s bucket. Higher values run earlier; a base-type listener does not precede a concrete-type listener because of its priority.
Returns
Section titled “Returns”A token that can cancel the one-shot listener before it runs.