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

    Class XRPlaneExtensions

    Provides extensions to the XRPlaneSubsystem.

    Inheritance
    System.Object
    XRPlaneExtensions
    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 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 XRPlaneSubsystem being extended.

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

    TrackableId planeId
    Returns
    Type Description
    IntPtr

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

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

    TrackableId planeId

    The TrackableId associated with this plane.

    Returns
    Type Description
    TrackingState

    The TrackingState of the plane with id planeId.

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

    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 TrackingState of the given TrackableId.

    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 true if successful, or false otherwise.

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

    PlaneDetectionFlags flags

    The plane detection mode(s) to enable.

    Returns
    Type Description
    System.Boolean

    true if the flags were successfully set, false otherwise.

    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