Class ARAnchorManager
Manages anchors.
Inheritance
Inherited Members
Namespace: UnityEngine .XR.ARFoundation
Assembly: solution.dll
Syntax
[DefaultExecutionOrder(-2147483647)]
[DisallowMultipleComponent]
[RequireComponent(typeof(ARSessionOrigin))]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/api/UnityEngine.XR.ARFoundation.ARAnchorManager.html")]
public sealed class ARAnchorManager : ARTrackableManager<XRAnchorSubsystem, XRAnchorSubsystemDescriptor, XRAnchorSubsystem.Provider, XRAnchor, ARAnchor>
Remarks
Use this component to programmatically add, remove, or query for
anchors. Anchors are Pose
s in the world
which will be periodically updated by an AR device as its understanding
of the world changes.
Subscribe to changes (added, updated, and removed) via the
anchors
Properties
Name | Description |
---|---|
anchor |
This prefab will be instantiated for each ARAnchor. May be |
game |
The name to assign to the |
Methods
Name | Description |
---|---|
Add |
Attempts to add an ARAnchor with the given |
Attach |
Attempts to create a new anchor that is attached to an existing ARPlane. |
Get |
Gets the ARAnchor with given |
Get |
Get the prefab to instantiate for each ARAnchor. |
On |
Invoked when the base class detects trackable changes. |
Remove |
Attempts to remove an ARAnchor. |
Events
Name | Description |
---|---|
anchors |
Invoked once per frame to communicate changes to anchors, including new anchors, the update of existing anchors, and the removal of previously existing anchors. |