API reference
API reference
Select your platform
No SDKs available
No versions available

InteractionEventChannel Class

Extends ScriptableObject
A ScriptableObject-based event channel designed for broadcasting InteractionEvents throughout the application.
Various systems can subscribe to the OnEventRaised event to react to global interaction state changes (e.g., Hover, Select, UI pointer events) in a decoupled manner.

Events

Event invoked when a new InteractionEvent is raised via the Raise method.
Systems interested in global interaction events should subscribe to this. This event is marked as NonSerializedAttribute and will be reset (cleared of subscribers) after Unity domain reloads (e.g., script compilation, entering/exiting play mode). Subscribers should ensure they re-subscribe, typically in their OnEnable method.

Member Functions

Raises an InteractionEvent, invoking the OnEventRaised delegate and notifying all current subscribers.
Parameters
interactionEvent
The InteractionEvent data to broadcast. This is passed by ref to potentially avoid copying a large struct, though InteractionEvent is small.
Did you find this page helpful?