XRAnchorTransferBatch.LoadAndReplaceAnchor(String, TrackableId) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Attempts to load a specified anchor from the transfer batch and replace the specified Unity anchor's tracking data with the new anchor.
public UnityEngine.XR.ARSubsystems.TrackableId LoadAndReplaceAnchor (string name, UnityEngine.XR.ARSubsystems.TrackableId trackableId);
member this.LoadAndReplaceAnchor : string * UnityEngine.XR.ARSubsystems.TrackableId -> UnityEngine.XR.ARSubsystems.TrackableId
Public Function LoadAndReplaceAnchor (name As String, trackableId As TrackableId) As TrackableId
Parameters
- name
- String
The anchor's identifier from the transfer batch.
- trackableId
- UnityEngine.XR.ARSubsystems.TrackableId
The existing Unity anchor to update to track this new spatial anchor.
Returns
The UnityEngine.XR.ARSubsystems.TrackableId of the resulting Unity anchor (usually the same as the passed-in parameter) if successfully loaded, or TrackableId.invalidId if the given name is not found.