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

InteractableStateChangeArgs Struct

IInteractableStateChangeArgs instances contain information relevant to the changing state of an IInteractableView.
This information is used internally by the Interaction SDK for a variety of tasks and can be leveraged directly in custom code. However, it is typically easier to observe IInteractable state changes using an InteractableUnityEventWrapper, which will unpack this information into discrete events which can be accessed and manipulated in the UnityEditor.

Constructors

InteractableStateChangeArgs ( previousState , newState )
Constructor for InteractableStateChangeArgs.
In general, only IInteractable instances are expected to invoke this.
Signature
Oculus.Interaction.InteractableStateChangeArgs.InteractableStateChangeArgs(InteractableState previousState, InteractableState newState)
Parameters
previousState: InteractableState  The IInteractable's prior InteractableState
newState: InteractableState  The IInteractable's new InteractableState

Properties

NewState : InteractableState
[Get]
The InteractableState of the emitting IInteractable after this state change.
State change events are emitted after the change has already taken place, so querying the state in a handler of such an event will return this new state.
Signature
InteractableState Oculus.Interaction.InteractableStateChangeArgs.NewState
PreviousState : InteractableState
[Get]
The InteractableState of the emitting IInteractable prior to this state change.
Note that state change events are emitted after the change has already taken place, and thus querying the state in a handler of such an event returns the new state, not the previous state.
Signature
InteractableState Oculus.Interaction.InteractableStateChangeArgs.PreviousState