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

InteractionBroadcaster Class

Extends MonoBehaviour
Manages interaction event broadcasting from various IInteractableView instances.
It centralizes core interaction events (like Hover, Select) and UI pointer events, forwarding them to a specified InteractionEventChannel. This component observes InteractableRegistry<TInteractor, TInteractable> for dynamic registration and unregistration of interactables, and manages individual event listeners. It also directly hooks into PointableCanvasModule for UI pointer events.

Public Statics

Gets the active singleton instance of the InteractionBroadcaster.
Returns null if no instance is active.

Events

Optional C# event for interaction monitoring.
Complements the _eventChannel ScriptableObject workflow with a pure C# implementation. Subscribers receive all interaction events regardless of the ScriptableObject channel configuration. Use this event for performance-sensitive systems or when you need to avoid ScriptableObject dependencies.

Member Functions

Registers a specific pair of Interactor and Interactable types for event monitoring.
This method subscribes to the static registration events of the corresponding InteractableRegistry<TInteractor, TInteractable> and registers all currently existing interactables of that type.
Others
TInteractor
The type of Interactor.
TInteractable
The type of Interactable, which must implement IInteractableView.
Stops monitoring a specific pair of Interactor and Interactable types.
This method unsubscribes from the static registration events of the InteractableRegistry<TInteractor, TInteractable>. Note: It does not automatically unregister currently tracked interactables of this type; that is typically handled in OnDisable or by direct calls to UnregisterInteractable.
Others
TInteractor
The type of Interactor.
TInteractable
The type of Interactable.

Static Member Functions

Allows external static invocation to register a custom interaction type pair using the active InteractionBroadcaster instance.
If no instance exists, a warning is logged.
Others
TInteractor
The type of Interactor.
TInteractable
The type of Interactable, which must implement IInteractableView.
Allows external static invocation to unregister a custom interaction type pair using the active InteractionBroadcaster instance.
If no instance exists, a warning is logged.
Others
TInteractor
The type of Interactor.
TInteractable
The type of Interactable.
Did you find this page helpful?