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

Interactor Class

Interactor provides a base template for any kind of interaction.
Oculus::Interaction::Interactor extends MonoBehaviour.
Oculus::Interaction::Interactor extends Oculus.Interaction.IInteractor.

Overview

Object Data

ulong
TInteractable
TInteractable
TInteractable
bool

Properties

bool
bool
bool
bool
int
bool
bool
InteractorState
State[Get]
object
TInteractable
TInteractable
TInteractable
bool
bool
bool
MAction< TInteractable >
MAction< TInteractable >
MAction< TInteractable >
MAction< TInteractable >
int
object
Data[Get]
bool

Object Data

void
void
void
void
void
bool
bool
void
InteractableSet
( TInteractable interactable )
void
InteractableUnset
( TInteractable interactable )
void
InteractableSelected
( TInteractable interactable )
void
InteractableUnselected
( TInteractable interactable )
void
Awake ( )
void
Start ( )
void
void
void
abstract TInteractable
int
ComputeCandidateTiebreaker
( TInteractable a,
TInteractable b )
void
void
void
void
void
Update ( )

Public Member Functions

void
SetComputeCandidateOverride
( Func< TInteractable > computeCandidate,
bool shouldClearOverrideOnSelect )
Overrides the interactor's ComputeCandidate() method with a new method.
void
Clears the function provided in SetComputeCandidateOverride().
void
SetComputeShouldSelectOverride
( Func< bool > computeShouldSelect,
bool clearOverrideOnSelect )
Overrides the interactor's ComputeShouldSelect() method with a new method.
void
Clears the function provided in SetComputeShouldSelectOverride().
void
SetComputeShouldUnselectOverride
( Func< bool > computeShouldUnselect,
bool clearOverrideOnUnselect )
Overrides the interactor's ComputeShouldUnselect() method with a new method.
void
Clears the function provided in SetComputeShouldUnselectOverride().
void
Executes any logic that should run before the interactor-specific logic.
void
Process ( )
Runs interactor-specific logic based on the interactor's current state.
void
Executes any logic that should run after the interactor-specific logic.
void
Determines what the interactable candidate should be.
void
Causes the interactor to unselect or unhover an interactable.
void
Hover ( )
Hovers the current candidate.
void
Unhover ( )
Unhovers the current candidate.
void
Select ( )
Selects the target interactable and sets the interactor's state to select.
void
Unselects the currently selected interactable and sets the interactor's state to hover.
bool
CanSelect
( TInteractable interactable )
Determines if an interactor can interact with an interactable.
void
Enable ( )
Enables a disabled interactor.
void
Disable ( )
Disables an interactor.
void
Drive ( )
Coordinates all of the interactor's interaction logic.
void
Sets an IActiveState for the interactor on a dynamically instantiated GameObject.
void
InjectOptionalInteractableFilters
( List< IGameObjectFilter > interactableFilters )
Sets an set of interactable filters for the interactor on a dynamically instantiated GameObject.
void
InjectOptionalCandidateTiebreaker
( IComparer< TInteractable > candidateTiebreaker )
Sets a candidate tiebreaker for the interactor on a dynamically instantiated GameObject.
void
InjectOptionalData
( object data )
Sets data for the interactor on a dynamically instantiated GameObject.

Details

Detailed Description

Interactions can be wholly defined by three things: the concrete Interactor, the concrete Interactable, and the logic governing their coordination.
Subclasses are responsible for implementing that coordination logic via template methods that operate on the concrete interactor and interactable classes.

Object Data

ulong Oculus.Interaction.Interactor< TInteractor, TInteractable >._nativeId
No description available.
TInteractable Oculus.Interaction.Interactor< TInteractor, TInteractable >._candidate
No description available.
TInteractable Oculus.Interaction.Interactor< TInteractor, TInteractable >._interactable
No description available.
TInteractable Oculus.Interaction.Interactor< TInteractor, TInteractable >._selectedInteractable
No description available.
bool Oculus.Interaction.Interactor< TInteractor, TInteractable >._started
No description available.

Properties

virtual bool Oculus.Interaction.Interactor< TInteractor, TInteractable >.ShouldHover
No description available.
virtual bool Oculus.Interaction.Interactor< TInteractor, TInteractable >.ShouldUnhover
No description available.
bool Oculus.Interaction.Interactor< TInteractor, TInteractable >.ShouldSelect
No description available.
bool Oculus.Interaction.Interactor< TInteractor, TInteractable >.ShouldUnselect
No description available.
int Oculus.Interaction.Interactor< TInteractor, TInteractable >.MaxIterationsPerFrame
No description available.
ISelector Oculus.Interaction.Interactor< TInteractor, TInteractable >.Selector
No description available.
bool Oculus.Interaction.Interactor< TInteractor, TInteractable >.QueuedSelect
No description available.
bool Oculus.Interaction.Interactor< TInteractor, TInteractable >.QueuedUnselect
No description available.
InteractorState Oculus.Interaction.Interactor< TInteractor, TInteractable >.State
No description available.
virtual object Oculus.Interaction.Interactor< TInteractor, TInteractable >.CandidateProperties
No description available.
TInteractable Oculus.Interaction.Interactor< TInteractor, TInteractable >.Candidate
No description available.
TInteractable Oculus.Interaction.Interactor< TInteractor, TInteractable >.Interactable
No description available.
TInteractable Oculus.Interaction.Interactor< TInteractor, TInteractable >.SelectedInteractable
No description available.
bool Oculus.Interaction.Interactor< TInteractor, TInteractable >.HasCandidate
No description available.
bool Oculus.Interaction.Interactor< TInteractor, TInteractable >.HasInteractable
No description available.
bool Oculus.Interaction.Interactor< TInteractor, TInteractable >.HasSelectedInteractable
No description available.
MAction<TInteractable> Oculus.Interaction.Interactor< TInteractor, TInteractable >.WhenInteractableSet
No description available.
MAction<TInteractable> Oculus.Interaction.Interactor< TInteractor, TInteractable >.WhenInteractableUnset
No description available.
MAction<TInteractable> Oculus.Interaction.Interactor< TInteractor, TInteractable >.WhenInteractableSelected
No description available.
MAction<TInteractable> Oculus.Interaction.Interactor< TInteractor, TInteractable >.WhenInteractableUnselected
No description available.
int Oculus.Interaction.Interactor< TInteractor, TInteractable >.Identifier
No description available.
object Oculus.Interaction.Interactor< TInteractor, TInteractable >.Data
No description available.
bool Oculus.Interaction.Interactor< TInteractor, TInteractable >.IsRootDriver
No description available.

Events

Action<InteractorStateChangeArgs> Oculus.Interaction.Interactor< TInteractor, TInteractable >.WhenStateChanged ( )
No description available.
Action Oculus.Interaction.Interactor< TInteractor, TInteractable >.WhenPreprocessed ( )
No description available.
Action Oculus.Interaction.Interactor< TInteractor, TInteractable >.WhenProcessed ( )
No description available.
Action Oculus.Interaction.Interactor< TInteractor, TInteractable >.WhenPostprocessed ( )
No description available.

Object Data

virtual void Oculus.Interaction.Interactor< TInteractor, TInteractable >.DoPreprocess ( )
No description available.
virtual void Oculus.Interaction.Interactor< TInteractor, TInteractable >.DoNormalUpdate ( )
No description available.
virtual void Oculus.Interaction.Interactor< TInteractor, TInteractable >.DoHoverUpdate ( )
No description available.
virtual void Oculus.Interaction.Interactor< TInteractor, TInteractable >.DoSelectUpdate ( )
No description available.
virtual void Oculus.Interaction.Interactor< TInteractor, TInteractable >.DoPostprocess ( )
No description available.
virtual bool Oculus.Interaction.Interactor< TInteractor, TInteractable >.ComputeShouldSelect ( )
No description available.
virtual bool Oculus.Interaction.Interactor< TInteractor, TInteractable >.ComputeShouldUnselect ( )
No description available.
virtual void Oculus.Interaction.Interactor< TInteractor, TInteractable >.InteractableSet
( TInteractable interactable )
No description available.
virtual void Oculus.Interaction.Interactor< TInteractor, TInteractable >.InteractableUnset
( TInteractable interactable )
No description available.
virtual void Oculus.Interaction.Interactor< TInteractor, TInteractable >.InteractableSelected
( TInteractable interactable )
No description available.
virtual void Oculus.Interaction.Interactor< TInteractor, TInteractable >.InteractableUnselected
( TInteractable interactable )
No description available.
virtual void Oculus.Interaction.Interactor< TInteractor, TInteractable >.Awake ( )
No description available.
virtual void Oculus.Interaction.Interactor< TInteractor, TInteractable >.Start ( )
No description available.
virtual void Oculus.Interaction.Interactor< TInteractor, TInteractable >.OnEnable ( )
No description available.
virtual void Oculus.Interaction.Interactor< TInteractor, TInteractable >.OnDisable ( )
No description available.
virtual void Oculus.Interaction.Interactor< TInteractor, TInteractable >.OnDestroy ( )
No description available.
abstract TInteractable Oculus.Interaction.Interactor< TInteractor, TInteractable >.ComputeCandidate ( )
No description available.
virtual int Oculus.Interaction.Interactor< TInteractor, TInteractable >.ComputeCandidateTiebreaker
( TInteractable a,
TInteractable b )
No description available.
virtual void Oculus.Interaction.Interactor< TInteractor, TInteractable >.HandleEnabled ( )
No description available.
virtual void Oculus.Interaction.Interactor< TInteractor, TInteractable >.HandleDisabled ( )
No description available.
virtual void Oculus.Interaction.Interactor< TInteractor, TInteractable >.HandleSelected ( )
No description available.
virtual void Oculus.Interaction.Interactor< TInteractor, TInteractable >.HandleUnselected ( )
No description available.
virtual void Oculus.Interaction.Interactor< TInteractor, TInteractable >.Update ( )
No description available.

Member Functions

virtual void Oculus.Interaction.Interactor< TInteractor, TInteractable >.SetComputeCandidateOverride
( Func< TInteractable > computeCandidate,
bool shouldClearOverrideOnSelect )
Overrides the interactor's ComputeCandidate() method with a new method.
Parameters
computeCandidate
The method used instead of the interactable's existing ComputeCandidate() method.
shouldClearOverrideOnSelect
If true, clear the computeCandidate function once you select an interactable.
virtual void Oculus.Interaction.Interactor< TInteractor, TInteractable >.ClearComputeCandidateOverride ( )
Clears the function provided in SetComputeCandidateOverride().
This is called when the interactor force releases an interactable.
virtual void Oculus.Interaction.Interactor< TInteractor, TInteractable >.SetComputeShouldSelectOverride
( Func< bool > computeShouldSelect,
bool clearOverrideOnSelect )
Overrides the interactor's ComputeShouldSelect() method with a new method.
Parameters
computeShouldSelect
The method used instead of the interactor's existing ComputeShouldSelect() method.
clearOverrideOnSelect
If true, clear the computeShouldSelect function once you select an interactable.
virtual void Oculus.Interaction.Interactor< TInteractor, TInteractable >.ClearComputeShouldSelectOverride ( )
Clears the function provided in SetComputeShouldSelectOverride().
This is called when the interactor force releases an interactable.
virtual void Oculus.Interaction.Interactor< TInteractor, TInteractable >.SetComputeShouldUnselectOverride
( Func< bool > computeShouldUnselect,
bool clearOverrideOnUnselect )
Overrides the interactor's ComputeShouldUnselect() method with a new method.
Parameters
computeShouldUnselect
The method used instead of the interactor's existing ComputeShouldUnselect() method.
clearOverrideOnUnselect
If true, clear the computeShouldUnselect function once you unselect an interactable.
virtual void Oculus.Interaction.Interactor< TInteractor, TInteractable >.ClearComputeShouldUnselectOverride ( )
Clears the function provided in SetComputeShouldUnselectOverride().
This is called when the interactor unselects an interactable.
void Oculus.Interaction.Interactor< TInteractor, TInteractable >.Preprocess ( )
Executes any logic that should run before the interactor-specific logic.
Runs before Process() and Postprocess().
void Oculus.Interaction.Interactor< TInteractor, TInteractable >.Process ( )
Runs interactor-specific logic based on the interactor's current state.
Runs after Preprocess() but before Postprocess(). Can be called multiple times per interaction frame.
void Oculus.Interaction.Interactor< TInteractor, TInteractable >.Postprocess ( )
Executes any logic that should run after the interactor-specific logic.
Runs after both Process() and Preprocess().
virtual void Oculus.Interaction.Interactor< TInteractor, TInteractable >.ProcessCandidate ( )
Determines what the interactable candidate should be.
void Oculus.Interaction.Interactor< TInteractor, TInteractable >.InteractableChangesUpdate ( )
Causes the interactor to unselect or unhover an interactable.
Called when an interactable is currently selected or hovered but a cancel <cref="IPointerEvent" /> occurs.
void Oculus.Interaction.Interactor< TInteractor, TInteractable >.Hover ( )
Hovers the current candidate.
void Oculus.Interaction.Interactor< TInteractor, TInteractable >.Unhover ( )
Unhovers the current candidate.
virtual void Oculus.Interaction.Interactor< TInteractor, TInteractable >.Select ( )
Selects the target interactable and sets the interactor's state to select.
virtual void Oculus.Interaction.Interactor< TInteractor, TInteractable >.Unselect ( )
Unselects the currently selected interactable and sets the interactor's state to hover.
virtual bool Oculus.Interaction.Interactor< TInteractor, TInteractable >.CanSelect
( TInteractable interactable )
Determines if an interactor can interact with an interactable.
Parameters
interactable
The interactable to check against.
Returns
True if the interactor can interact with the given interactable.
void Oculus.Interaction.Interactor< TInteractor, TInteractable >.Enable ( )
Enables a disabled interactor.
void Oculus.Interaction.Interactor< TInteractor, TInteractable >.Disable ( )
Disables an interactor.
virtual void Oculus.Interaction.Interactor< TInteractor, TInteractable >.Drive ( )
Coordinates all of the interactor's interaction logic.
void Oculus.Interaction.Interactor< TInteractor, TInteractable >.InjectOptionalActiveState
( IActiveState activeState )
Sets an IActiveState for the interactor on a dynamically instantiated GameObject.
void Oculus.Interaction.Interactor< TInteractor, TInteractable >.InjectOptionalInteractableFilters
( List< IGameObjectFilter > interactableFilters )
Sets an set of interactable filters for the interactor on a dynamically instantiated GameObject.
void Oculus.Interaction.Interactor< TInteractor, TInteractable >.InjectOptionalCandidateTiebreaker
( IComparer< TInteractable > candidateTiebreaker )
Sets a candidate tiebreaker for the interactor on a dynamically instantiated GameObject.
void Oculus.Interaction.Interactor< TInteractor, TInteractable >.InjectOptionalData
( object data )
Sets data for the interactor on a dynamically instantiated GameObject.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon