AnchorConverter.CreateFromOpenXRHandle(UInt64) 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.
Create a new ARAnchor from the given OpenXR XRSpatialAnchorMSFT handle.
public static UnityEngine.XR.ARSubsystems.TrackableId CreateFromOpenXRHandle (ulong openxrAnchorHandle);
static member CreateFromOpenXRHandle : uint64 -> UnityEngine.XR.ARSubsystems.TrackableId
Public Shared Function CreateFromOpenXRHandle (openxrAnchorHandle As ULong) As TrackableId
Parameters
- openxrAnchorHandle
- UInt64
A valid OpenXR XRSpatialAnchorMSFT handle.
Returns
Returns the trackable id representing the Unity anchor or UnityEngine.XR.ARSubsystems.TrackableId.invalidId if the conversion was unsuccessful.
Remarks
The newly created TrackableId will not be added to UnityEngine.XR.ARFoundation.ARTrackableManager`5.trackables collection until the next frame's Update. The app should listen to the UnityEngine.XR.ARFoundation.ARAnchorManager.anchorsChanged event for the added ARAnchor object with the returned trackableId.