docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IARInteractor

    An interface that allows interactors to raycast against the AR environment.

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

    Properties

    enableARRaycasting

    Enables raycasts against AR environment trackables.

    Declaration
    bool enableARRaycasting { get; }
    Property Value
    Type Description
    bool
    See Also
    XRRayInteractor

    occludeARHitsWith2DObjects

    Enables occlusion of AR raycast hits by 2D objects such as UI.

    Declaration
    bool occludeARHitsWith2DObjects { get; }
    Property Value
    Type Description
    bool
    See Also
    XRRayInteractor

    occludeARHitsWith3DObjects

    Enables occlusion of AR raycast hits by 3D objects.

    Declaration
    bool occludeARHitsWith3DObjects { get; }
    Property Value
    Type Description
    bool
    See Also
    XRRayInteractor

    trackableType

    The types of AR trackables that this interactor will be able to raycast against.

    Declaration
    TrackableType trackableType { get; }
    Property Value
    Type Description
    TrackableType
    See Also
    XRRayInteractor

    Methods

    TryGetCurrentARRaycastHit(out ARRaycastHit)

    Gets the first AR ray cast hit, if any ray cast hits are available.

    Declaration
    bool TryGetCurrentARRaycastHit(out ARRaycastHit raycastHit)
    Parameters
    Type Name Description
    ARRaycastHit raycastHit

    When this method returns, contains the ray cast hit if available; otherwise, the default value.

    Returns
    Type Description
    bool

    Returns true if a hit occurred, implying the ray cast hit information is valid. Otherwise, returns false.

    See Also
    XRRayInteractor

    See Also

    XRRayInteractor
    In This Article
    Back to top
    Copyright © 2026 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)