docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ARCoreAnchorSubsystem

    The ARCore implementation of the XRAnchorSubsystem. Do not create this directly. Use the SubsystemManager instead.

    Inheritance
    object
    SubsystemWithProvider
    SubsystemWithProvider<XRAnchorSubsystem, XRAnchorSubsystemDescriptor, XRAnchorSubsystem.Provider>
    TrackingSubsystem<XRAnchor, XRAnchorSubsystem, XRAnchorSubsystemDescriptor, XRAnchorSubsystem.Provider>
    XRAnchorSubsystem
    ARCoreAnchorSubsystem
    Implements
    ISubsystem
    Inherited Members
    XRAnchorSubsystem.GetChanges(Allocator)
    XRAnchorSubsystem.TryAddAnchor(Pose, out XRAnchor)
    XRAnchorSubsystem.TryAddAnchorAsync(Pose)
    XRAnchorSubsystem.TryAttachAnchor(TrackableId, Pose, out XRAnchor)
    XRAnchorSubsystem.TryRemoveAnchor(TrackableId)
    XRAnchorSubsystem.TrySaveAnchorAsync(TrackableId, CancellationToken)
    XRAnchorSubsystem.TrySaveAnchorsAsync(NativeArray<TrackableId>, Allocator, CancellationToken)
    XRAnchorSubsystem.TryLoadAnchorAsync(SerializableGuid, CancellationToken)
    XRAnchorSubsystem.TryLoadAnchorsAsync(NativeArray<SerializableGuid>, Allocator, Action<NativeArray<XRLoadAnchorResult>>, CancellationToken)
    XRAnchorSubsystem.TryEraseAnchorAsync(SerializableGuid, CancellationToken)
    XRAnchorSubsystem.TryEraseAnchorsAsync(NativeArray<SerializableGuid>, Allocator, CancellationToken)
    XRAnchorSubsystem.TryGetSavedAnchorIdsAsync(Allocator, CancellationToken)
    TrackingSubsystem<XRAnchor, XRAnchorSubsystem, XRAnchorSubsystemDescriptor, XRAnchorSubsystem.Provider>.GetChanges(Allocator)
    SubsystemWithProvider<XRAnchorSubsystem, XRAnchorSubsystemDescriptor, XRAnchorSubsystem.Provider>.subsystemDescriptor
    SubsystemWithProvider.Start()
    SubsystemWithProvider.Stop()
    SubsystemWithProvider.Destroy()
    SubsystemWithProvider.running
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.XR.ARCore
    Assembly: Unity.XR.ARCore.dll
    Syntax
    [Preserve]
    public sealed class ARCoreAnchorSubsystem : XRAnchorSubsystem, ISubsystem

    Methods

    EstimateFeatureMapQualityForHosting(TrackableId, ref ArFeatureMapQuality)

    Returns the quality of feature points seen in the preceding few seconds from a given anchor. Refer to ARCore docs for more information: https://developers.google.com/ar/develop/c/cloud-anchors/developer-guide#check_the_mapping_quality_of_feature_points

    Declaration
    public XRResultStatus EstimateFeatureMapQualityForHosting(TrackableId anchorId, ref ArFeatureMapQuality quality)
    Parameters
    Type Name Description
    TrackableId anchorId

    The ID of the anchor

    ArFeatureMapQuality quality

    The feature map quality of the anchor

    Returns
    Type Description
    XRResultStatus

    The result status

    TrySaveAnchorWithLifespanAsync(TrackableId, uint, CancellationToken)

    Attempts to persistently save the given anchor so that it can be loaded in a future AR session. This method takes a lifespan parameter that indicates how long the anchor should persist for. The platform may have a maximum lifespan that cannot be exceeded.

    Declaration
    public Awaitable<Result<SerializableGuid>> TrySaveAnchorWithLifespanAsync(TrackableId anchorId, uint lifespan, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    TrackableId anchorId

    The TrackableId of the anchor to save.

    uint lifespan

    The lifespan (in days) of the anchor.

    CancellationToken cancellationToken

    An optional CancellationToken that you can use to cancel the operation in progress if the loaded provider supportsAsyncCancellation.

    Returns
    Type Description
    Awaitable<Result<SerializableGuid>>

    The result of the async operation, containing a new persistent anchor GUID if the operation succeeded. You are responsible to await this result.

    See Also
    supportsSaveAnchor

    Implements

    ISubsystem
    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)