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

ActiveStateTagSetFilter Class

Extends MonoBehaviour
A state-aware filter that conditionally includes or excludes interactables based on an IActiveState.
Can operate in two modes: Exclude (deny-list) or Include (allow-list).
Exclude Mode (default): When the active state is true, interactables tagged with the specified tag are filtered out. Common use case: Implementing graceful fallback from Gaze to Ray interactions. When attached to a RayInteractor with a GazeActiveState, the Ray interactor is blocked from interacting with tagged interactables when gaze tracking is available. When gaze tracking becomes unavailable, those interactables become accessible to the Ray interactor.
Include Mode: When the active state is true, only interactables tagged with the specified tag are allowed. Common use case: Progressive disclosure or conditional access patterns. For example, only allow interaction with objects tagged "TutorialStep2" when that step is active.
This component is generic and works with any IActiveState implementation, enabling various conditional interaction patterns.
Typical setup for Gaze/Ray fallback (Exclude mode):

Properties

Tag : string
[Get][Set]
Gets or sets the tag to check on target interactables.
Behavior depends on the filter mode setting.
Signature
string Oculus.Interaction.ActiveStateTagSetFilter.Tag

Protected Methods

Awake ()
Signature
virtual void Oculus.Interaction.ActiveStateTagSetFilter.Awake()
Returns
void
Start ()
Signature
virtual void Oculus.Interaction.ActiveStateTagSetFilter.Start()
Returns
void

Methods

Filter ( target )
Filters a GameObject based on the current state, mode, and presence of the tag.
When the active state is inactive, all GameObjects pass the filter (return true).
When the active state is active:
  • Exclude mode: GameObjects with the tag are excluded (return false), others pass (return true)
  • Include mode: Only GameObjects with the tag pass (return true), others are excluded (return false)
Signature
bool Oculus.Interaction.ActiveStateTagSetFilter.Filter(GameObject target)
Parameters
target: GameObject  The GameObject to filter
Returns
bool  True if the GameObject should be included in interaction, false if it should be excluded (filtered out)
InjectActiveState ( activeState )
Sets the active state in a dynamically instantiated ActiveStateTagSetFilter.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.ActiveStateTagSetFilter.InjectActiveState(IActiveState activeState)
Parameters
activeState: IActiveState
Returns
void
InjectAllActiveStateTagSetFilter ( activeState )
Sets all required fields for a dynamically instantiated ActiveStateTagSetFilter.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.ActiveStateTagSetFilter.InjectAllActiveStateTagSetFilter(IActiveState activeState)
Parameters
activeState: IActiveState  The active state to observe
Returns
void