Class XRAnchorSubsystem | AR Subsystems | 4.2.10
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class XRAnchorSubsystem

    Base class for an anchor subsystem.

    Inheritance
    object
    SubsystemWithProvider
    SubsystemWithProvider<XRAnchorSubsystem, XRAnchorSubsystemDescriptor, XRAnchorSubsystem.Provider>
    TrackingSubsystem<XRAnchor, XRAnchorSubsystem, XRAnchorSubsystemDescriptor, XRAnchorSubsystem.Provider>
    XRAnchorSubsystem
    Implements
    ISubsystem
    Inherited Members
    TrackingSubsystem.GetChanges(Allocator)
    SubsystemWithProvider.OnCreate()
    SubsystemWithProvider.OnStart()
    SubsystemWithProvider.OnStop()
    SubsystemWithProvider.OnDestroy()
    SubsystemWithProvider.subsystemDescriptor
    SubsystemWithProvider.provider
    SubsystemWithProvider.Start()
    SubsystemWithProvider.OnStart()
    SubsystemWithProvider.Stop()
    SubsystemWithProvider.OnStop()
    SubsystemWithProvider.Destroy()
    SubsystemWithProvider.OnDestroy()
    SubsystemWithProvider.running
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: UnityEngine.XR.ARSubsystems
    Assembly: solution.dll
    Syntax
    public class XRAnchorSubsystem : TrackingSubsystem, ISubsystem
    Remarks

    An anchor is a pose in the physical environment that is tracked by an XR device. As the device refines its understanding of the environment, anchors will be updated, allowing you to keep virtual content connected to a real-world position and orientation.

    This abstract class should be implemented by an XR provider and instantiated using the SubsystemManager to enumerate the available XRAnchorSubsystemDescriptors.

    Constructors

    Name Description
    XRAnchorSubsystem()

    Constructor. Do not invoke directly; use the SubsystemManager to enumerate the available XRAnchorSubsystemDescriptors and call Create on the desired descriptor.

    Methods

    Name Description
    GetChanges(Allocator)

    Get the changes to anchors (added, updated, and removed) since the last call to GetChanges(Allocator).

    TryAddAnchor(Pose, out XRAnchor)

    Attempts to create a new anchor with the provide pose.

    TryAttachAnchor(TrackableId, Pose, out XRAnchor)

    Attempts to create a new anchor "attached" to the trackable with id trackableToAffix. The behavior of the anchor depends on the type of trackable to which this anchor is attached.

    TryRemoveAnchor(TrackableId)

    Attempts to remove an existing anchor with TrackableId anchorId.

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