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

IInteractorView Interface

IInteractorView provides the most high-level, abstract view available of a conceptual "interactor," instances of which represent user intent and agency in an experience.
This interface is used internally in Interaction SDK logic (for example, within InteractableGroup), 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 IInteractorView directly.

Properties

An identifier uniquely associated with the conceptual "interactor" instance represented by this IInteractorView.
Identifiers are associated with individual instances (not classes) of concrete "interactor" types; thus, many different IInteractorView instances can return the same identifier, but there is exactly one concrete "interactor" instance (PokeInteractor, GrabInteractor, etc.) associated with that identifier, which all the views reflect.
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.
A property indicating whether there is some interaction that the conceptual "interactor" could undertake.
For typical transitive interactions (i.e., PokeInteractor, GrabInteractor, and others where the interaction is applied to some conceptual "interactable"), this indicates whether or not there is some IInteractable with which this interactor can initiate an interaction. For intransitive interactions such as Locomotion.LocomotionTurnerInteractor which do not conceptually apply the interaction to something, this property merely indicates whether or not it is possible for the intransitive interaction to take place at this time.
A generic metadata property used for a variety of purposes in Interaction SDK logic.
Though this property is public and canonically may contain instances of types such as RayInteractor.RayCandidateProperties, it has no formal contract and is not safe to use outside of Interaction SDK core logic.
A property indicating whether this conceptual "interactor" is actively hovering or selecting, which for most interactions means there is an IInteractable with which the interactor is currently associated.
In general, this will be true when State returns either InteractorState.Hover or InteractorState.Select.
A property indicating whether this conceptual "interactor" is actively selecting, which for most interactions means there is an IInteractable with which the interactor is currently interacting.
This is only true if State is InteractorState.Select.
The current InteractorState of the conceptual "interactor" represented by this IInteractorView.
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 InteractorUnityEventWrapper) in order to reliably handle all state changes as they come.

Events

An event invoked every time the conceptual "interactor" represented by this IInteractorView changes State.
This is the recommended way to observe and respond to the state of interactors. To make the information communicated by this event available in the UnityEditor, an InteractorUnityEventWrapper can be leveraged to unpack the details of the state change and expose them in the Editor as Unity events.
An event invoked when the conceptual "interactor" represented by this IInteractorView is preprocessed.
This is part of Interaction SDK core logic connected to the internal function of interactors and interactor groups, and it is not recommended that these events be used for non-core development.
An event invoked when the conceptual "interactor" represented by this IInteractorView is processed.
This is part of Interaction SDK core logic connected to the internal function of interactors and interactor groups, and it is not recommended that these events be used for non-core development.
An event invoked when the conceptual "interactor" represented by this IInteractorView is postprocessed.
This is part of Interaction SDK core logic connected to the internal function of interactors and interactor groups, and it is not recommended that these events be used for non-core development.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon