Skip to main content
←API Reference ←NianticSpatial.NSDK.AR.VPS2 ←ARVps2AnchorManager

TryTrackAnchor

Starts tracking the anchor encoded by anchorPayload.

Declaration​

public bool TryTrackAnchor(string anchorPayload, out ARVps2Anchor anchorOut)

Summary​

Starts tracking the anchor encoded by anchorPayload.

Remarks​

Use this only to restore an AR anchor the app created itself with
TryCreateAnchor and saved with TryGetAnchorPayload.

Returns​

true if the anchor was accepted for tracking; otherwise false.

Notice

An anchor payload is no longer the preferred method to identify the map to localize against: target a map by site ID with TryLocalize or by coordinate with its lat/long overload. An anchor is tied to the site asset it was created against, so it will not resolve against a different site or a different asset of the same site.

Parameters​

NameTypeSummary
anchorPayloadstring
The payload which encodes the anchor.
anchorOutout ARVps2Anchor
The tracked anchor.