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

IInteractableView Interface

IInteractableView provides the most high-level, abstract view available of a conceptual "interactable," instances of which represent the targets of transitive user intent and agency in an experience; in other words, when the user is trying to do something, interactables are what they're trying to do it to.
This interface is used internally in Interaction SDK logic, but because of its highly abstract nature and lack of information about the type of interaction is represented, you will typically work with descendant types rather than with IInteractableView directly.

Properties

A generic metadata property used for a variety of purposes in Interaction SDK logic.
Though this property is public, it has no formal contract, and consequently it is generally not safe to assume that any specific piece of information is available through this property on any instance at any time.
The current InteractableState of the conceptual "interactable" represented by this IInteractableView.
This property is used in core Interaction SDK logic, and querying it directly is not recommended as the state can change repeatedly and at unpredictable times within a frame depending on occurrances within the interaction system. Rather than querying the state at an arbitrary point during the frame, it is recommended to observe the WhenStateChanged event (either directly our through an InteractableUnityEventWrapper) in order to reliably handle all state changes as they come.
The largest number of conceptual "interactor" instances (technically IInteractorViews) which can simultaneously interact with this instance.
By convention, -1 indicates an unbounded maximum.
The largest number of conceptual "interactor" instances (technically IInteractorViews) which can simultaneously select this instance.
By convention, -1 indicates an unbounded maximum.
Enumerates all of the IInteractorViews currently associated with this instance.
This includes all varieties of interaction association (both InteractableState.Hover and InteractableState.Select), but does not include candidacy (see IInteractorView.HasCandidate).
Enumerates all of the IInteractorViews currently selecting this instance, excluding all states of association other than InteractableState.Select.

Events

An event invoked every time the conceptual "interactable" represented by this IInteractableView changes State.
This is the recommended way to observe and respond to the state of interactables. To make the information communicated by this event available in the UnityEditor, an InteractableUnityEventWrapper can be leveraged to unpack the details of the state change and expose them in the Editor as Unity events.
Invoked when a new IInteractorView begins interacting with this interactable and is consequently added to the InteractorViews enumeration.
Note that this event is invoked after the new element has already been added to the enumeration.
Invoked when an IInteractorView stops interacting with this interactable and is consequently removed from the InteractorViews enumeration.
Note that this event is invoked after the enumeration has already been modified.
Invoked when a new IInteractorView begins selecting this interactable and is consequently added to the SelectingInteractorViews enumeration.
Note that this event is invoked after the new element has already been added to the enumeration.
Invoked when an IInteractorView stops interacting with this interactable and is consequently removed from the InteractorViews enumeration.
Note that this event is invoked after the enumeration has already been modified.
Did you find this page helpful?