docs.unity3d.com
    目次を表示する/隠す

    Class XRPlaneSubsystem.Provider

    The API that derived classes must implement.

    Inheritance
    Object
    SubsystemProvider
    UnityEngine.SubsystemsImplementation.SubsystemProvider<XRPlaneSubsystem>
    XRPlaneSubsystem.Provider
    Inherited Members
    UnityEngine.SubsystemsImplementation.SubsystemProvider<UnityEngine.XR.ARSubsystems.XRPlaneSubsystem>.TryInitialize()
    UnityEngine.SubsystemsImplementation.SubsystemProvider<UnityEngine.XR.ARSubsystems.XRPlaneSubsystem>.Start()
    UnityEngine.SubsystemsImplementation.SubsystemProvider<UnityEngine.XR.ARSubsystems.XRPlaneSubsystem>.Stop()
    UnityEngine.SubsystemsImplementation.SubsystemProvider<UnityEngine.XR.ARSubsystems.XRPlaneSubsystem>.Destroy()
    UnityEngine.SubsystemsImplementation.SubsystemProvider.running
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.XR.ARSubsystems
    Syntax
    public abstract class Provider : SubsystemProvider<XRPlaneSubsystem>

    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

    CreateOrResizeNativeArrayIfNecessary<T>(Int32, Allocator, ref NativeArray<T>)

    Creates or resizes the array if necessary. If array has been allocated and its length is equal to length, then this method does nothing. If its length is different, then it is first disposed before being assigned to a new NativeArray.

    Declaration
    protected static void CreateOrResizeNativeArrayIfNecessary<T>(int length, Allocator allocator, ref NativeArray<T> array)
        where T : struct
    Parameters
    Type Name Description
    Int32 length

    The length that array will have after this method returns.

    Allocator allocator

    If allocation is necessary, this allocator will be used to create the new NativeArray.

    NativeArray<T> array

    The array to create or resize.

    Type Parameters
    Name Description
    T

    The type of elements held by the array.

    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 to planes (added, updated, and removed) 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.

    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)