Class XRReferencePointExtensions | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class XRReferencePointExtensions

    Provides extensions to the XRReferencePointSubsystem.

    Inheritance
    System.Object
    XRReferencePointExtensions
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    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 XRReferencePointSubsystem being extended.

    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 XRReferencePointSubsystem being extended.

    TrackableId trackableId

    The TrackableId of the trackable to which to attach.

    Pose pose

    The initial Pose of the trackable.

    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 XRReferencePointSubsystem being extended.

    TrackableId referencePointId
    Returns
    Type Description
    IntPtr

    An IntPtr associated with the reference point, or IntPtr.Zero if unavailable.

    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 IntPtr associated with a given TrackableId.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023