docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IXRParentInteractableLink

    An interface that represents an interactable component that has an optional reference to a parent interactable for determining processing order of interactables.

    Namespace: UnityEngine.XR.Interaction.Toolkit
    Assembly: Unity.XR.Interaction.Toolkit.dll
    Syntax
    public interface IXRParentInteractableLink
    Remarks

    Interactor or interactable components that implement this interface enable the XRInteractionManager to automatically register the parent relationship when the component is registered. If the interactable component does not implement this interface, any parent relationship the component has must be manually registered.

    Properties

    autoFindParentInteractableInHierarchy

    Whether the XR Interaction Manager will automatically find a parent interactable up the GameObject hierarchy when this object is first registered with it. Set to disabled if you want to avoid the runtime performance expense of an automatic GetComponentInParent call.

    Declaration
    bool autoFindParentInteractableInHierarchy { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    Ignored if the parentInteractable reference is assigned.

    See Also
    parentInteractable

    parentInteractable

    An optional reference to a parent interactable for determining processing order of interactables.

    Declaration
    IXRInteractable parentInteractable { get; set; }
    Property Value
    Type Description
    IXRInteractable
    Remarks

    For interactables that implement this, the referenced parent interactable will be processed before this interactable.
    For interactors that implement this, selected interactables will inherit this referenced parent interactable for determining the process order of interactables such that parents are processed before their children interactables.
    The interactables must be registered with the same XR Interaction Manager for this to have an effect on processing order.

    See Also
    ProcessInteractable(UpdatePhase)
    RegisterInteractor(IXRInteractor)
    RegisterInteractable(IXRInteractable)
    RegisterParentRelationship(IXRInteractor, IXRInteractable)
    RegisterParentRelationship(IXRInteractable, IXRInteractable)

    See Also

    ProcessInteractable(UpdatePhase)
    RegisterInteractor(IXRInteractor)
    RegisterInteractable(IXRInteractable)
    RegisterParentRelationship(IXRInteractor, IXRInteractable)
    RegisterParentRelationship(IXRInteractable, IXRInteractable)
    In This Article
    Back to top
    Copyright © 2025 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)