docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Interface IXRFocusInteractable

    An interface that represents an Interactable component which an Interactor component can persistently select.

    Inherited Members
    IXRInteractable.registered
    IXRInteractable.unregistered
    IXRInteractable.interactionLayers
    IXRInteractable.colliders
    IXRInteractable.transform
    IXRInteractable.GetAttachTransform(IXRInteractor)
    IXRInteractable.OnRegistered(InteractableRegisteredEventArgs)
    IXRInteractable.OnUnregistered(InteractableUnregisteredEventArgs)
    IXRInteractable.ProcessInteractable(XRInteractionUpdateOrder.UpdatePhase)
    IXRInteractable.GetDistanceSqrToInteractor(IXRInteractor)
    Namespace: UnityEngine.XR.Interaction.Toolkit
    Assembly: solution.dll
    Syntax
    public interface IXRFocusInteractable : IXRInteractable

    Properties

    Name Description
    canFocus

    Indicates whether this Interactable can be focused.

    firstFocusEntered

    The event that is called only when the first Interaction Group gains focus on this Interactable as the sole focusing Interactor. Subsequent Interactors that gain focus will not cause this event to be invoked as long as any others are still focusing.

    firstInteractionGroupFocusing

    (Read Only) The first interaction group that is focused on this interactable since not being focused. The group may not currently be focusing this interactable, which would be the case when it released while multiple groups were focusing this interactable.

    focusEntered

    The event that is called when an Interaction group gains focus on this Interactable.

    focusExited

    The event that is called when an Interaction group loses focus on this Interactable.

    focusMode

    Indicates the focus policy of an Interactable.

    interactionGroupsFocusing

    (Read Only) The list of Interaction groups currently focusing on this Interactable (may by empty).

    isFocused

    (Read Only) Indicates whether this interactable is currently being focused by any interaction group.

    lastFocusExited

    The event that is called only when the last remaining focused Interaction group loses focus on this Interactable.

    Methods

    Name Description
    OnFocusEntered(FocusEnterEventArgs)

    The XRInteractionManager calls this method when the Interaction group first gains focus of an Interactable in a second pass.

    OnFocusEntering(FocusEnterEventArgs)

    The XRInteractionManager calls this method right before the Interaction group first gains focus of an Interactable in a first pass.

    OnFocusExited(FocusExitEventArgs)

    The XRInteractionManager calls this method when the Interaction group loses focus of an Interactable in a second pass.

    OnFocusExiting(FocusExitEventArgs)

    The XRInteractionManager calls this method right before the Interaction group loses focus of an Interactable in a first pass.

    Extension Methods

    XRFocusInteractableExtensions.GetOldestInteractorFocusing(IXRFocusInteractable)
    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)