Develop

Interaction SDK Selector Interface

Updated: Aug 13, 2026
An ISelector defines a selection mechanism for an interaction, such as a button press or an index pinch.
For instances where Interactors don’t themselves define a selection mechanism (such as Ray or Grab), an ISelector can be provided to those Interactors.

The ISelector interface

ISelector exposes two events. An Interactor listens to them to start and end a selection.
public interface ISelector
{
    event Action WhenSelected;
    event Action WhenUnselected;
}

Selector implementations

Interaction SDK includes these ISelector implementations, among others. Each one supplies a different way for the user to confirm a selection.
ImplementationSelection mechanism
IndexPinchSelector
A hand tracking pinch between the index finger and thumb.
ControllerSelector
A controller button press.
ActiveStateSelector
An IActiveState becoming active, which routes active state logic into a selection.
VirtualSelector
A Select() or Unselect() call from your own code, or a flag toggled in the Inspector.
The selector is a separate component from the Interactor. It determines how the user triggers a selection. To change that trigger, wire in a different ISelector. Any other references an Interactor requires are configured separately.

Selectors and gaze

Experimental
This feature is considered experimental. Use caution when implementing it in your projects as it could have performance implications resulting in artifacts or other issues that may affect your project.
A GazeInteractor targets an object by where the user looks. It does not define its own selection mechanism. It requires an ISelector to supply the confirmation step, assigned to its Selector property.
GazeInteractor asserts on that property at startup, so leaving it unassigned is a setup error, not a supported configuration. The assert is marked [Conditional("UNITY_ASSERTIONS")], so it compiles out of non-development builds. The Selector property is protected. To assign a selector from your own code, call InjectSelector(ISelector).
Pair a GazeInteractor with an IndexPinchSelector for hand tracking, or with a ControllerSelector for controllers. The selector determines how the user triggers the selection. A GazeInteractor also holds other required references that you configure for the input setup you are targeting.

Learn more

  • To learn about Interactors, which use selectors to start and end an interaction, see Interactors.
  • To learn about active states, which ActiveStateSelector converts into selections, see Active State.

Reference