Interface 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.
Namespace: UnityEngine.XR.Interaction.Toolkit.Filtering
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
public interface IXRSelectFilter
Properties
canProcess
Whether this select filter can process interactions. Select filters that can process interactions receive calls to Process(IXRSelectInteractor, IXRSelectInteractable), select filters that cannot process do not.
Declaration
bool canProcess { get; }
Property Value
Type | Description |
---|---|
bool |
Remarks
It's recommended to return isActiveAndEnabled when implementing this interface in a MonoBehaviour.
See Also
Methods
Process(IXRSelectInteractor, IXRSelectInteractable)
Called by the host object (XRInteractionManager, XRBaseInteractor or XRBaseInteractable) to verify if the select interaction between the given Interactor and Interactable can be performed.
Declaration
bool Process(IXRSelectInteractor interactor, IXRSelectInteractable interactable)
Parameters
Type | Name | Description |
---|---|---|
IXRSelectInteractor | interactor | The Interactor to validate the select interaction. |
IXRSelectInteractable | interactable | The Interactable to validate the select interaction. |
Returns
Type | Description |
---|---|
bool | Returns true when the given Interactor can select the given Interactable. Otherwise, returns false. |