Partilhar via


XRAnchorTransferBatch.AddAnchor(TrackableId, String) Method

Definition

Tries to convert and add an anchor with the corresponding UnityEngine.XR.ARSubsystems.TrackableId to an export list.

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

Parameters

trackableId
UnityEngine.XR.ARSubsystems.TrackableId

The UnityEngine.XR.ARSubsystems.TrackableId of an anchor to be exported.

name
String

A string to identify this anchor upon import to another device.

Returns

Whether the anchor was successfully converted into a Perception SpatialAnchor and added to the export list.

Remarks

Call ExportAsync(XRAnchorTransferBatch) to get the transferable anchor data.

Applies to