docs.unity3d.com
    Show / Hide Table of Contents

    Class XRPlaneSubsystem.Provider

    The API that derived classes must implement.

    Inheritance
    Object
    XRPlaneSubsystem.Provider
    XRPlaneSubsystemImpl.TestProvider
    Namespace: UnityEngine.XR.ARSubsystems
    Syntax
    public abstract class Provider

    Properties

    currentPlaneDetectionMode

    Get the current plane detection mode in use by the provider.

    Declaration
    public virtual PlaneDetectionMode currentPlaneDetectionMode { get; }
    Property Value
    Type Description
    PlaneDetectionMode

    requestedPlaneDetectionMode

    Get or set the requested PlaneDetectionMode.

    Declaration
    public virtual PlaneDetectionMode requestedPlaneDetectionMode { get; set; }
    Property Value
    Type Description
    PlaneDetectionMode

    Methods

    Destroy()

    Destroy the plane subsystem. Stop() is always called first.

    Declaration
    public virtual void Destroy()

    GetBoundary(TrackableId, Allocator, ref NativeArray<Vector2>)

    Retrieves the boundary points of the plane with trackableId.

    Declaration
    public virtual void GetBoundary(TrackableId trackableId, Allocator allocator, ref NativeArray<Vector2> boundary)
    Parameters
    Type Name Description
    TrackableId trackableId

    The id of the plane.

    Allocator allocator

    An Allocator to use for the returned NativeArray.

    NativeArray<Vector2> boundary

    An existing NativeArray to update or recreate if necessary. See CreateOrResizeNativeArrayIfNecessary<T>(Int32, Allocator, ref NativeArray<T>).

    GetChanges(BoundedPlane, Allocator)

    Get the changes (added, updated, and removed) planes since the last call to GetChanges(BoundedPlane, Allocator).

    Declaration
    public abstract TrackableChanges<BoundedPlane> GetChanges(BoundedPlane defaultPlane, Allocator allocator)
    Parameters
    Type Name Description
    BoundedPlane defaultPlane

    The default plane. This should be used to initialize the returned NativeArrays for backwards compatibility. See TrackableChanges(Void*, Int32, Void*, Int32, Void*, Int32, T, Int32, Allocator).

    Allocator allocator

    An Allocator to use when allocating the returned NativeArrays.

    Returns
    Type Description
    TrackableChanges<BoundedPlane>

    TrackableChanges<T> describing the planes that have been added, updated, and removed since the last call to GetChanges(BoundedPlane, Allocator). The changes should be allocated using allocator.

    Start()

    Start the plane subsystem, i.e., start tracking planes.

    Declaration
    public virtual void Start()

    Stop()

    Stop the subsystem, i.e., stop tracking planes.

    Declaration
    public virtual void Stop()
    Back to top
    Terms of use
    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