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

ControllerSelector Class

Extends MonoBehaviour, ISelector
ISelector for determining whether an IController is selecting based on button presses.
This is the most common controller-based selection mechanism for all interactions.
It is possible to have multiple of these selectors monitoring the same IController, particularly when different selection mechanisms apply to different interaction types. For example, if simultaneously controlling a RayInteractor from the trigger button and GrabInteractor from the grip button, each of those interactors would have its own associated ControllerSelector specific to the relevant buttons.

Member Enumerations

Enumeration ControllerSelectorLogicOperator

Determines whether selection requires all ControllerButtonUsage buttons, or merely one of them, in order to enter a selection state.
Used by the RequireButtonUsages property.
Any
= 0
All
= 1

Properties

Flag set determining which buttons on Controller can be activated (pressed, touched, etc.) in order for this ControllerSelector to enter a "select" state.
Depending on RequireButtonUsages, one or all of these buttons may be required to select.
Determines whether selection requires all ControllerButtonUsage buttons, or merely one of them, in order to enter a selection state.
The IController which dictates the state of this selector.
WhenSelected and WhenUnselected will be invoked based on the input state of this controller, as specified by the ControllerButtonUsage and RequireButtonUsages properties.

Events

Implementation of ISelector.WhenSelected; for details, please refer to the related documentation provided for that event.
Implementation of ISelector.WhenUnselected; for details, please refer to the related documentation provided for that event.

Protected Functions

virtual void Awake ( )
virtual void Start ( )
virtual void Update ( )

Member Functions

Injects all required dependencies for a dynamically instantiated ControllerSelector; effectively wraps InjectController(IController).
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Sets an IController for a dynamically instantiated ControllerSelector.
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