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

IInteractor Interface

An IInteractor is an instance which represents user intent and agency in an experience.
For example, a PokeInteractor is responsible for indicating within experience logic that the user is able to poke things, determining when the user is trying to do so, and translating that user intent into interaction. Interactors are arguably the most fundamental concept of the Interaction SDK.
Despite its conceptual centrality, the IInteractor interface itself contains no methods or properties which should be leveraged in normal (non-core) development. All typical developer-facing APIs are defined in other types, either IInteractorView or descendents of IInteractor. IInteractor itself exclusively contains details of core Interaction SDK logic, and so these methods and properties should only be accessed to add or modify core functionality.

Properties

Returns true if interactor processing has determined that this interactor should enter a hover state (i.e., it has identified an acceptable IInteractable candidate and has no stipulations which would prevent it from hovering), false otherwise.
This API is a part of Interaction SDK core logic and is meaningless outside of interactor processing.
Returns true if interactor processing has determined that this interactor should abandon its hover state (i.e., it has no acceptable IInteractable candidate or has stipulations which prevent it from hovering), false otherwise.
This API is a part of Interaction SDK core logic and is meaningless outside of interactor processing.
Returns true if interactor processing has determined that this interactor should enter a select state (i.e., it has an IInteractable candidate and has met the criteria needed to select), false otherwise.
This API is a part of Interaction SDK core logic and is meaningless outside of interactor processing.
Returns true if interactor processing has determined that this interactor should abandon its select state (i.e., it is already selecting an IInteractable, but it no longer meets the requirements to continue selecting that interactable), false otherwise.
This API is a part of Interaction SDK core logic and is meaningless outside of interactor processing.

Member Functions

Runs the "preprocess" phase, a part of the internal contract of updating an IInteractor.
This is a part of Interaction SDK core logic and is not expected to be invoked outside of core functionality.
Runs the "process" phase, a part of the internal contract of updating an IInteractor.
This is a part of Interaction SDK core logic and is not expected to be invoked outside of core functionality.
Runs the "postprocess" phase, a part of the internal contract of updating an IInteractor.
This is a part of Interaction SDK core logic and is not expected to be invoked outside of core functionality.
Runs interaction-specific logic to identify whether there is currently an opportunity for interaction and, if so and if applicable, with which IInteractable.
This is a part of Interaction SDK core logic and is not expected to be invoked outside of core functionality.
Ensures that the neccessary steps have been performed in order to ready this interactor instance for interaction.
Importantly, this is not the correct mechanism to manually control whether an interactor is active in the scene; interactor enabling/disabling should be handled by enabling/disabling MonoBehaviours and GameObjects as appropriate. This API is part of Interaction SDK core logic and should not be invoked outside of core functionality.
Ensures that the neccessary steps have been performed in order for this interactor instance to cease interaction.
Importantly, this is not the correct mechanism to manually control whether an interactor is active in the scene; interactor enabling/disabling should be handled by enabling/disabling MonoBehaviours and GameObjects as appropriate. This API is part of Interaction SDK core logic and should not be invoked outside of core functionality.
Follows through on a processing result which determined that this interactor instance ShouldHover.
Importantly, this is not a mechanism by which an interactor can be forced to adopt a hover state. No such mechanism is supported at this level of abstraction; for more information and relevant concerns, see Interactor<TInteractor, TInteractable>.SetComputeCandidateOverride(Func<TInteractable>, bool). This API is a part of Interaction SDK core logic and should not be invoked outside of core functionality.
Follows through on a processing result which determined that this interactor instance ShouldUnhover.
Importantly, this is not a mechanism by which an interactor can be forced to abandon a hover state. No such mechanism is supported at this level of abstraction; for more information and relevant concerns, see Interactor<TInteractor, TInteractable>.SetComputeCandidateOverride(Func<TInteractable>, bool). This API is a part of Interaction SDK core logic and should not be invoked outside of core functionality.
Follows through on a processing result which determined that this interactor instance ShouldSelect.
Importantly, this is not a mechanism by which an interactor can be forced to adopt a select state. No such mechanism is supported at this level of abstraction; for more information and relevant concerns, see Interactor<TInteractor, TInteractable>.SetComputeShouldSelectOverride(Func<bool>, bool). This API is a part of Interaction SDK core logic and should not be invoked outside of core functionality.
Follows through on a processing result which determined that this interactor instance ShouldUnselect.
Importantly, this is not a mechanism by which an interactor can be forced to abandon a select state. No such mechanism is supported at this level of abstraction; for more information and relevant concerns, see Interactor<TInteractor, TInteractable>.SetComputeShouldUnselectOverride(Func<bool>, bool). This API is a part of Interaction SDK core logic and should not be invoked outside of core functionality.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon