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.

Fields

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.
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.
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.
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.
Unity event invoked whenever the underlying IInteractableView.WhenInteractorViewAdded event is invoked, which occurs whenever a new IInteractorView begins interacting with the underlying interactable.
Unity event invoked whenever the underlying IInteractableView.WhenInteractorViewRemoved event is invoked, which occurs whenever an IInteractorView ceases interacting with the underlying interactable.
Unity event invoked whenever the underlying IInteractableView.WhenSelectingInteractorViewAdded event is invoked, which occurs whenever a new IInteractorView begins selecting the underlying interactable.
Unity event invoked whenever the underlying IInteractableView.WhenSelectingInteractorViewRemoved event is invoked, which occurs whenever a new IInteractorView ceases selecting the underlying interactable.

Protected Fields

bool _started[Get]

Protected Functions

virtual void Awake ( )
virtual void Start ( )
virtual void OnEnable ( )
virtual void OnDisable ( )

Member Functions

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.
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.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon