Class XRReferencePointExtensions
Provides extensions to the XRReferencePointSubsystem
.
Inheritance
Inherited Members
Namespace: UnityEngine.XR.ARExtensions
Syntax
public static class XRReferencePointExtensions
Methods
ActivateExtensions(XRReferencePointSubsystem)
Sets the active subsystem whose extension methods should be used.
Declaration
public static void ActivateExtensions(this XRReferencePointSubsystem referencePointSubsystem)
Parameters
Type | Name | Description |
---|---|---|
XRReferencePointSubsystem | referencePointSubsystem | The |
AttachReferencePoint(XRReferencePointSubsystem, TrackableId, Pose)
Creates a new reference point that is "attached" to an existing trackable, like a plane. The reference point will update with the trackable according to rules specific to that trackable type.
Declaration
public static TrackableId AttachReferencePoint(this XRReferencePointSubsystem referencePointSubsystem, TrackableId trackableId, Pose pose)
Parameters
Type | Name | Description |
---|---|---|
XRReferencePointSubsystem | referencePointSubsystem | The |
TrackableId | trackableId | The |
Pose | pose | The initial |
Returns
Type | Description |
---|---|
TrackableId |
GetNativePtr(XRReferencePointSubsystem, TrackableId)
Retrieves a native IntPtr
associated with a reference point with TrackableId
trackableId.
Declaration
public static IntPtr GetNativePtr(this XRReferencePointSubsystem referencePointSubsystem, TrackableId referencePointId)
Parameters
Type | Name | Description |
---|---|---|
XRReferencePointSubsystem | referencePointSubsystem | The |
TrackableId | referencePointId |
Returns
Type | Description |
---|---|
IntPtr | An |
RegisterAttachReferencePointHandler(String, XRReferencePointExtensions.AttachReferencePointDelegate)
For internal use. Allows a reference point provider to register for the TryAttachReferencePoint extension
Declaration
public static void RegisterAttachReferencePointHandler(string subsystemId, XRReferencePointExtensions.AttachReferencePointDelegate handler)
Parameters
Type | Name | Description |
---|---|---|
System.String | subsystemId | The string name associated with the reference point provider to extend. |
XRReferencePointExtensions.AttachReferencePointDelegate | handler | A method that returns true if permission is granted. |
RegisterGetNativePtrHandler(String, Func<XRReferencePointSubsystem, TrackableId, IntPtr>)
For internal use. Allows a reference point provider to register for the GetNativePtr(XRReferencePointSubsystem, TrackableId) extension.
Declaration
public static void RegisterGetNativePtrHandler(string subsystemId, Func<XRReferencePointSubsystem, TrackableId, IntPtr> handler)
Parameters
Type | Name | Description |
---|---|---|
System.String | subsystemId | The string name associated with the reference point provider to extend. |
Func<XRReferencePointSubsystem, TrackableId, IntPtr> | handler | A method that returns the |