Class 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.
Implements
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit.Filtering
Assembly: solution.dll
Syntax
public abstract class XRBaseTargetFilter : MonoBehaviour, IXRTargetFilter
Properties
| Name | Description |
|---|---|
| canProcess | Whether this Target Filter can process and filter targets. Filters that can process targets receive calls to Process(IXRInteractor, List<IXRInteractable>, List<IXRInteractable>), filters that cannot process do not. |
Methods
| Name | Description |
|---|---|
| Link(IXRInteractor) | Called by Unity when the given Interactor links to this filter. Use this to do any code initialization for the given Interactor. |
| Process(IXRInteractor, List<IXRInteractable>, List<IXRInteractable>) | Called by the linked Interactor to filter the Interactables that it could possibly interact with this frame. Implement your custom logic to filter the Interactable candidates in this method. |
| Unlink(IXRInteractor) | Called by Unity when the given Interactor unlinks from this filter. Use this to do any code cleanup for the given Interactor. |