Namespace UnityEngine.XR.Interaction.Toolkit.Filtering
Classes
XRAngleGazeEvaluator
Evaluates the angle between the Gaze Transform's forward direction and the vector to the target Interactable. The target Interactable with the smallest angle will receive the highest normalized score.
XRBaseTargetFilter
Abstract base class from which all Target Filter behaviours derive. Instances of this class can be assigned to an XRBaseInteractor using the Inspector by setting the Starting Target Filter (startingTargetFilter). This serves as a serializable reference instead of using targetFilter which is not serialized.
XRDistanceEvaluator
Evaluates the Interactor distance from the target Interactable. Targets close to the Interactor will receive a highest score and targets far way will receive a lower score.
XRHoverFilterDelegate
A hover filter that forwards its processing to a delegate (delegateToProcess). Useful to create custom filters by code without needing to create new classes.
XRLastSelectedEvaluator
The last selected target Interactable will receive the highest normalized score.
In the moment that an Interactable is selected by any of the linked Interactors, it'll have the highest normalized
score of 1
. Its normalized score will linearly decrease with time until the score reaches 0
after
maxTime seconds.
XRSelectFilterDelegate
A select filter that forwards its processing to a delegate (delegateToProcess). Useful to create custom filters by code without needing to create new classes.
XRTargetEvaluator
Abstract base class from which all Target Evaluators derive.
This class evaluates the intention to interact with an Interactable by calculating a score (a float
value).
Used by the XRTargetFilter behavior which allows the list of valid targets returned by an Interactor
to be customized as determined by these evaluators.
XRTargetFilter
Target Filter that uses a list of evaluator objects to filter Interactable targets (candidates) returned by the Interactor each frame. You can edit the evaluator list and the evaluators properties in the Inspector.
Interfaces
IXRHoverFilter
Instances that implement this interface are called hover filters. Hover filters process additional validation checks after the base class hover validation checks are processed. Add a hover filter to the following objects to extend its hover validations:
- XRInteractionManager: to add a global hover filter used to validate all hover interactions in the manager.
- XRBaseInteractor: to add an Interactor hover filter used to validate the hover interactions in the Interactor.
- XRBaseInteractable: to add an Interactable hover filter used to validate the hover interactions in the Interactable.
IXRSelectFilter
Instances that implement this interface are called select filters. Select filters process additional validation checks after the base class select validation checks are processed. Add a select filter to the following objects to extend its select validations:
- XRInteractionManager: to add a global select filter used to validate all select interactions in the manager.
- XRBaseInteractor: to add an Interactor select filter used to validate the select interactions in the Interactor.
- XRBaseInteractable: to add an Interactable select filter used to validate the select interactions in the Interactable.
IXRTargetEvaluatorLinkable
An interface that an XRTargetFilter can implement to receive calls whenever an Interactor links to or
unlinks from its filter.
Implement this interface if the evaluator needs to subscribe to events or cache data from the linked Interactors.
IXRTargetFilter
An interface responsible to filter a list of Interactable targets (candidates) for interaction with a linked Interactor.