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

InteractableUnityEventWrapper Class

Extends MonoBehaviour
Exposes Unity events that broadcast state changes from an IInteractableView (an interactable).
This is one of the most convenient ways to manage interaction consequences in the UnityEditor. Through the events exposed to the Editor by InteractableUnityEventWrapper, you can directly connect core interactable state changes (WhenHover, WhenUnhover, etc.) to invocations elsewhere in the scene, such as enabling or disabling a GameObject when a button is pressed, for example.

Protected Fields

_started : bool
Signature
bool Oculus.Interaction.InteractableUnityEventWrapper._started

Fields

WhenHover : UnityEvent
Unity event invoked whenever the underlying IInteractableView.State goes from InteractableState.Normal to InteractableState.Hover.
This is a decomposition of IInteractableView.WhenStateChanged intended to allow individual state changes to be specifically and conveniently leveraged through the Editor.
Signature
UnityEvent Oculus.Interaction.InteractableUnityEventWrapper.WhenHover
WhenInteractorViewAdded : UnityEvent
Unity event invoked whenever the underlying IInteractableView.WhenInteractorViewAdded event is invoked, which occurs whenever a new IInteractorView begins interacting with the underlying interactable.
Signature
UnityEvent Oculus.Interaction.InteractableUnityEventWrapper.WhenInteractorViewAdded
WhenInteractorViewRemoved : UnityEvent
Unity event invoked whenever the underlying IInteractableView.WhenInteractorViewRemoved event is invoked, which occurs whenever an IInteractorView ceases interacting with the underlying interactable.
Signature
UnityEvent Oculus.Interaction.InteractableUnityEventWrapper.WhenInteractorViewRemoved
WhenSelect : UnityEvent
Unity event invoked whenever the underlying IInteractableView.State goes from InteractableState.Hover to InteractableState.Select.
This is a decomposition of IInteractableView.WhenStateChanged intended to allow individual state changes to be specifically and conveniently leveraged through the Editor.
Signature
UnityEvent Oculus.Interaction.InteractableUnityEventWrapper.WhenSelect
WhenSelectingInteractorViewAdded : UnityEvent
Unity event invoked whenever the underlying IInteractableView.WhenSelectingInteractorViewAdded event is invoked, which occurs whenever a new IInteractorView begins selecting the underlying interactable.
Signature
UnityEvent Oculus.Interaction.InteractableUnityEventWrapper.WhenSelectingInteractorViewAdded
WhenSelectingInteractorViewRemoved : UnityEvent
Unity event invoked whenever the underlying IInteractableView.WhenSelectingInteractorViewRemoved event is invoked, which occurs whenever a new IInteractorView ceases selecting the underlying interactable.
Signature
UnityEvent Oculus.Interaction.InteractableUnityEventWrapper.WhenSelectingInteractorViewRemoved
WhenUnhover : UnityEvent
Unity event invoked whenever the underlying IInteractableView.State goes from InteractableState.Hover to InteractableState.Normal.
This is a decomposition of IInteractableView.WhenStateChanged intended to allow individual state changes to be specifically and conveniently leveraged through the Editor.
Signature
UnityEvent Oculus.Interaction.InteractableUnityEventWrapper.WhenUnhover
WhenUnselect : UnityEvent
Unity event invoked whenever the underlying IInteractableView.State goes from InteractableState.Select to InteractableState.Hover.
This is a decomposition of IInteractableView.WhenStateChanged intended to allow individual state changes to be specifically and conveniently leveraged through the Editor.
Signature
UnityEvent Oculus.Interaction.InteractableUnityEventWrapper.WhenUnselect

Protected Methods

Awake ()
Signature
virtual void Oculus.Interaction.InteractableUnityEventWrapper.Awake()
Returns
void
OnDisable ()
Signature
virtual void Oculus.Interaction.InteractableUnityEventWrapper.OnDisable()
Returns
void
OnEnable ()
Signature
virtual void Oculus.Interaction.InteractableUnityEventWrapper.OnEnable()
Returns
void
Start ()
Signature
virtual void Oculus.Interaction.InteractableUnityEventWrapper.Start()
Returns
void

Methods

InjectAllInteractableUnityEventWrapper ( interactableView )
Sets all required dependencies for a dynamically instantiated InteractableUnityEventWrapper.
This is a convenience method wrapping InjectInteractableView(IInteractableView). This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.InteractableUnityEventWrapper.InjectAllInteractableUnityEventWrapper(IInteractableView interactableView)
Parameters
interactableView: IInteractableView
Returns
void
InjectInteractableView ( interactableView )
Sets the an IInteractableView as the underlying interactable for a dynamically instantiated InteractableUnityEventWrapper.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.InteractableUnityEventWrapper.InjectInteractableView(IInteractableView interactableView)
Parameters
interactableView: IInteractableView
Returns
void