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

InteractionEvent Struct

Represents the data associated with a specific interaction state change, such as a hover, selection, or UI pointer event.

Fields

The specific type of interaction that occurred (e.g., HoverStart, SelectEnd, UISelectStart).
The Oculus.Interaction.IInteractorView component that initiated or is involved in the interaction.
This can be null if the event is not directly tied to a specific IInteractorView instance (e.g., some UI events might only have a _pointerId).
The GameObject that is the primary target or source of the interaction (e.g., the interactable object that was hovered or selected).
This can be null if the interaction source is not a GameObject or is not applicable.
An identifier for UI pointer interactions, such as UnityEngine.EventSystems.PointerEventData.pointerId.
Defaults to -1 if not applicable or unknown. For non-UI interactions tied to an InteractorView, the IInteractorView.Identifier should be preferred if a unique ID is needed.

Constructors & Destructors

Initializes a new instance of the InteractionEvent struct.
Parameters
type
The InteractionType of the event.
interactorView
The IInteractorView involved in the interaction. Can be null.
source
The source GameObject of the interaction. Can be null.
pointerId
The pointer ID, typically for UI events. Defaults to -1.
Did you find this page helpful?