docs.unity.cn
    Show / Hide Table of Contents

    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
    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
    Boolean
    Remarks

    It's recommended to return isActiveAndEnabled when implementing this interface in a MonoBehaviour.

    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
    Boolean

    Returns true when the given Interactor can select the given Interactable. Otherwise, returns false.

    See Also

    startingSelectFilters
    selectFilters
    startingSelectFilters
    selectFilters
    startingSelectFilters
    selectFilters
    IXRHoverFilter
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Tuesday, July 18, 2023