Class XRAnchorSubsystem
Base class for an anchor subsystem.
Inheritance
Implements
Inherited Members
Namespace: UnityEngine.XR.ARSubsystems
Assembly: solution.dll
Syntax
public class XRAnchorSubsystem : TrackingSubsystem<XRAnchor, XRAnchorSubsystem, XRAnchorSubsystemDescriptor, XRAnchorSubsystem.Provider>, 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 |
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 |
TryAttachAnchor(TrackableId, Pose, out XRAnchor) | Attempts to create a new anchor "attached" to the trackable with id |
TryRemoveAnchor(TrackableId) | Attempts to remove an existing anchor with TrackableId |