ARVps2AnchorManager
↳ extends UnityEngine.XR.ARFoundation.ARTrackableManager
A trackable manager surfacing VPS2 anchors as ARVps2Anchor trackables.
Declaration
public class ARVps2AnchorManager : ARTrackableManager<XRVps2AnchorSubsystem, XRVps2AnchorSubsystemDescriptor, Provider, XRVps2Anchor, ARVps2Anchor>Remarks
ARVps2Manager requires this component next to it and forwards its anchor methods here, so it is the usual entry point. Trackables live under the XR origin, so their transforms are in Unity world space. Disabling this component removes all anchors. Anchors mark a place in the world that content should stay attached to. VPS2 must localize to a map before anchors can be created for it: use TryLocalize with a site ID, or its lat/long overload.
Properties
| Name | Type | Summary |
|---|---|---|
| readonly gameObjectName | string | The name assigned to each instantiated ARVps2Anchor GameObject. |
Methods
| Name | Type | Summary |
|---|---|---|
| GetPrefab | GameObject | Gets the prefab to instantiate for each ARVps2Anchor. |
| OnDisable | void | - |
| RemoveAnchor | void | Stops tracking an anchor and destroys its trackable. |
| TryCreateAnchor | bool | Attempts to create a new anchor at localPose. |
| TryGetAnchorPayload | bool | Gets the payload which encodes the anchor. The payload can be used to re-track the anchor in a different VPS2 session. |
| TryTrackAnchor | bool | Starts tracking the anchor encoded by anchorPayload. |