docs.unity.cn
    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 Copyright © 2020 Unity Technologies
    Generated by DocFX
    on 12 February 2021