AnchorConverter.ToPerceptionSpatialAnchor Method

Definition

Overloads

ToPerceptionSpatialAnchor(IntPtr)

Get a COM wrapper object of Windows.Perception.Spatial.SpatialAnchor from the given ARAnchor's nativePtr.

ToPerceptionSpatialAnchor(TrackableId)

Get a COM wrapper object of Windows.Perception.Spatial.SpatialAnchor from the given TrackableId. If failed, the function returns nullptr.

ToPerceptionSpatialAnchor(IntPtr)

Get a COM wrapper object of Windows.Perception.Spatial.SpatialAnchor from the given ARAnchor's nativePtr.

public static object ToPerceptionSpatialAnchor (IntPtr nativePtr);
static member ToPerceptionSpatialAnchor : nativeint -> obj
Public Shared Function ToPerceptionSpatialAnchor (nativePtr As IntPtr) As Object

Parameters

nativePtr
IntPtr

nativeint

The nativePtr obtained from either XRAnchor.nativePtr or ARAnchor.nativePtr.

Returns

The COM wrapper object of Windows.Perception.Spatial.SpatialAnchor, or null when the conversion failed.

Applies to

ToPerceptionSpatialAnchor(TrackableId)

Get a COM wrapper object of Windows.Perception.Spatial.SpatialAnchor from the given TrackableId. If failed, the function returns nullptr.

public static object ToPerceptionSpatialAnchor (UnityEngine.XR.ARSubsystems.TrackableId trackableId);
static member ToPerceptionSpatialAnchor : UnityEngine.XR.ARSubsystems.TrackableId -> obj
Public Shared Function ToPerceptionSpatialAnchor (trackableId As TrackableId) As Object

Parameters

trackableId
UnityEngine.XR.ARSubsystems.TrackableId

An existing XRAnchor or ARAnchor's ID.

Returns

The COM wrapper object of Windows.Perception.Spatial.SpatialAnchor, or null when the conversion failed.

Applies to