docs.unity3d.com
    Show / Hide Table of Contents

    Interface 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.

    Namespace: UnityEngine.XR.Interaction.Toolkit.Filtering
    Syntax
    public interface IXRHoverFilter

    Properties

    canProcess

    Whether this hover filter can process interactions. Hover filters that can process interactions receive calls to Process(IXRHoverInteractor, IXRHoverInteractable), hover 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(IXRHoverInteractor, IXRHoverInteractable)

    Called by the host object (XRInteractionManager, XRBaseInteractor or XRBaseInteractable) to verify if the hover interaction between the given Interactor and Interactable can be performed.

    Declaration
    bool Process(IXRHoverInteractor interactor, IXRHoverInteractable interactable)
    Parameters
    Type Name Description
    IXRHoverInteractor interactor

    The Interactor to validate the hover interaction.

    IXRHoverInteractable interactable

    The Interactable to validate the hover interaction.

    Returns
    Type Description
    Boolean

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

    See Also

    startingHoverFilters
    hoverFilters
    startingHoverFilters
    hoverFilters
    startingHoverFilters
    hoverFilters
    IXRSelectFilter
    In This Article
    • Properties
      • canProcess
    • Methods
      • Process(IXRHoverInteractor, IXRHoverInteractable)
    • See Also
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023