Class XRPlaneExtensions
Provides extensions to the XRPlaneSubsystem.
Inheritance
Inherited Members
Namespace: UnityEngine.XR.ARExtensions
Syntax
public static class XRPlaneExtensions
Methods
ActivateExtensions(XRPlaneSubsystem)
Sets the active subsystem whose extension methods should be used.
Declaration
public static void ActivateExtensions(this XRPlaneSubsystem planeSubsystem)
Parameters
| Type | Name | Description |
|---|---|---|
| XRPlaneSubsystem | planeSubsystem | The |
GetNativePtr(XRPlaneSubsystem, TrackableId)
Retrieves a native IntPtr associated with a plane with TrackableId
trackableId.
Declaration
public static IntPtr GetNativePtr(this XRPlaneSubsystem planeSubsystem, TrackableId planeId)
Parameters
| Type | Name | Description |
|---|---|---|
| XRPlaneSubsystem | planeSubsystem | The |
| TrackableId | planeId |
Returns
| Type | Description |
|---|---|
| IntPtr | An |
GetTrackingState(XRPlaneSubsystem, TrackableId)
Retrieve the TrackingState of the given planeId.
Declaration
public static TrackingState GetTrackingState(this XRPlaneSubsystem planeSubsystem, TrackableId planeId)
Parameters
| Type | Name | Description |
|---|---|---|
| XRPlaneSubsystem | planeSubsystem | The |
| TrackableId | planeId | The |
Returns
| Type | Description |
|---|---|
| TrackingState | The |
RegisterGetNativePtrHandler(String, Func<XRPlaneSubsystem, TrackableId, IntPtr>)
For internal use. Allows a plane provider to register for the GetNativePtr(XRPlaneSubsystem, TrackableId) extension.
Declaration
public static void RegisterGetNativePtrHandler(string subsystemId, Func<XRPlaneSubsystem, TrackableId, IntPtr> handler)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | subsystemId | The string name associated with the plane provider to extend. |
| Func<XRPlaneSubsystem, TrackableId, IntPtr> | handler | A method that returns the |
RegisterGetTrackingStateHandler(String, Func<XRPlaneSubsystem, TrackableId, TrackingState>)
For internal use. Allows a plane provider to register for the GetTrackingState(XRPlaneSubsystem, TrackableId) extension.
Declaration
public static void RegisterGetTrackingStateHandler(string subsystemId, Func<XRPlaneSubsystem, TrackableId, TrackingState> handler)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | subsystemId | The string name associated with the plane provider to extend. |
| Func<XRPlaneSubsystem, TrackableId, TrackingState> | handler | A method that returns the |
RegisterTrySetPlaneDetectionFlagsHandler(String, Func<XRPlaneSubsystem, PlaneDetectionFlags, Boolean>)
For internal use. Allows a plane provider to register for the TrySetPlaneDetectionFlags(XRPlaneSubsystem, PlaneDetectionFlags) extension.
Declaration
public static void RegisterTrySetPlaneDetectionFlagsHandler(string subsystemId, Func<XRPlaneSubsystem, PlaneDetectionFlags, bool> handler)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | subsystemId | The string name associated with the plane provider to extend. |
| Func<XRPlaneSubsystem, PlaneDetectionFlags, System.Boolean> | handler | A method that attempts to set the plane detection flags and returns |
TrySetPlaneDetectionFlags(XRPlaneSubsystem, PlaneDetectionFlags)
Attempt to set the PlaneDetectionFlags.
Declaration
public static bool TrySetPlaneDetectionFlags(this XRPlaneSubsystem planeSubsystem, PlaneDetectionFlags flags)
Parameters
| Type | Name | Description |
|---|---|---|
| XRPlaneSubsystem | planeSubsystem | The |
| PlaneDetectionFlags | flags | The plane detection mode(s) to enable. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
|