Partager via


XRAnchorStore.TryPersistAnchor(TrackableId, String) Method

Definition

Persist an anchor in the anchor store, where it can be retrieved using LoadAnchor(String).

public bool TryPersistAnchor (UnityEngine.XR.ARSubsystems.TrackableId trackableId, string name);
member this.TryPersistAnchor : UnityEngine.XR.ARSubsystems.TrackableId * string -> bool
Public Function TryPersistAnchor (trackableId As TrackableId, name As String) As Boolean

Parameters

trackableId
UnityEngine.XR.ARSubsystems.TrackableId

The UnityEngine.XR.ARSubsystems.TrackableId of an anchor to be persisted in the store.

name
String

A string to identify this anchor if it's successfully persisted in the store.

Returns

True if the anchor was successfully persisted, false if an error occurred.

Applies to