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

    Class XRPlaneSubsystem

    Base class for plane subsystems.

    Inheritance
    Object
    SubsystemWithProvider
    UnityEngine.SubsystemsImplementation.SubsystemWithProvider<XRPlaneSubsystem, XRPlaneSubsystemDescriptor, XRPlaneSubsystem.Provider>
    TrackingSubsystem<BoundedPlane, XRPlaneSubsystem, XRPlaneSubsystemDescriptor, XRPlaneSubsystem.Provider>
    XRPlaneSubsystem
    SimulationPlaneSubsystem
    Inherited Members
    TrackingSubsystem<BoundedPlane, XRPlaneSubsystem, XRPlaneSubsystemDescriptor, XRPlaneSubsystem.Provider>.GetChanges(Allocator)
    UnityEngine.SubsystemsImplementation.SubsystemWithProvider<UnityEngine.XR.ARSubsystems.XRPlaneSubsystem, UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRPlaneSubsystem.Provider>.OnCreate()
    UnityEngine.SubsystemsImplementation.SubsystemWithProvider<UnityEngine.XR.ARSubsystems.XRPlaneSubsystem, UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRPlaneSubsystem.Provider>.OnStart()
    UnityEngine.SubsystemsImplementation.SubsystemWithProvider<UnityEngine.XR.ARSubsystems.XRPlaneSubsystem, UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRPlaneSubsystem.Provider>.OnStop()
    UnityEngine.SubsystemsImplementation.SubsystemWithProvider<UnityEngine.XR.ARSubsystems.XRPlaneSubsystem, UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRPlaneSubsystem.Provider>.OnDestroy()
    UnityEngine.SubsystemsImplementation.SubsystemWithProvider<UnityEngine.XR.ARSubsystems.XRPlaneSubsystem, UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRPlaneSubsystem.Provider>.subsystemDescriptor
    UnityEngine.SubsystemsImplementation.SubsystemWithProvider<UnityEngine.XR.ARSubsystems.XRPlaneSubsystem, UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRPlaneSubsystem.Provider>.provider
    SubsystemWithProvider.Start()
    UnityEngine.SubsystemsImplementation.SubsystemWithProvider.OnStart()
    SubsystemWithProvider.Stop()
    UnityEngine.SubsystemsImplementation.SubsystemWithProvider.OnStop()
    SubsystemWithProvider.Destroy()
    UnityEngine.SubsystemsImplementation.SubsystemWithProvider.OnDestroy()
    SubsystemWithProvider.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 class XRPlaneSubsystem : TrackingSubsystem<BoundedPlane, XRPlaneSubsystem, XRPlaneSubsystemDescriptor, XRPlaneSubsystem.Provider>, ISubsystem
    Remarks

    This subsystem surfaces information regarding the detection of planes (that is, flat surfaces) in the physical environment. Implementations are typically found in other provider or platform-specific packages.

    Constructors

    XRPlaneSubsystem()

    Constructs a plane subsystem. Do not invoke directly; call Create on the XRPlaneSubsystemDescriptor instead.

    Declaration
    public XRPlaneSubsystem()

    Properties

    currentPlaneDetectionMode

    Get the current PlaneDetectionMode in use by the provider.

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

    requestedPlaneDetectionMode

    Get or set the requested PlaneDetectionMode, for example, to enable different modes of detection.

    Declaration
    public PlaneDetectionMode requestedPlaneDetectionMode { get; set; }
    Property Value
    Type Description
    PlaneDetectionMode
    Exceptions
    Type Condition
    NotSupportedException

    Thrown if requestedPlaneDetectionMode is set to something other than None when plane detection is not supported.

    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>)

    Gets the boundary polygon describing the plane.

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

    The TrackableId associated with the plane of which to retrieve the boundary.

    Allocator allocator

    An Allocator to use if boundary needs to be created. Allocator.Temp is not supported; use Allocator.TempJob if you need temporary memory.

    NativeArray<Vector2> boundary

    The boundary will be stored here. If boundary is the same length as the new boundary, it is overwritten with the new data. Otherwise, it is disposed and recreated with the correct length.

    GetChanges(Allocator)

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

    Declaration
    public override TrackableChanges<BoundedPlane> GetChanges(Allocator allocator)
    Parameters
    Type Name Description
    Allocator allocator

    An Allocator to use when allocating the returned NativeArrays.

    Returns
    Type Description
    TrackableChanges<BoundedPlane>

    TrackableChanges<T> that describes the planes that have been added, updated, and removed since the last call to GetChanges(Allocator). The caller owns the memory allocated with Allocator.

    Overrides
    UnityEngine.XR.ARSubsystems.TrackingSubsystem<UnityEngine.XR.ARSubsystems.BoundedPlane, UnityEngine.XR.ARSubsystems.XRPlaneSubsystem, UnityEngine.XR.ARSubsystems.XRPlaneSubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRPlaneSubsystem.Provider>.GetChanges(Unity.Collections.Allocator)
    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)