Class ARPlane
Represents a plane (that is, a flat surface) detected by an AR device.
Inheritance
Implements
Inherited Members
Namespace: UnityEngine.XR.ARFoundation
Assembly: Unity.XR.ARFoundation.dll
Syntax
[DefaultExecutionOrder(-2147483646)]
[DisallowMultipleComponent]
public sealed class ARPlane : ARTrackable<BoundedPlane, ARPlane>, ITrackable
Remarks
Generated by the ARPlaneManager when an AR device detects a plane in the environment.
Related information: AR Plane component
Properties
alignment
The alignment of this plane.
Declaration
public PlaneAlignment alignment { get; }
Property Value
Type | Description |
---|---|
PlaneAlignment |
boundary
The plane's boundary points, in plane space, that is, relative to this ARPlane's local position and rotation.
Declaration
public NativeArray<Vector2> boundary { get; }
Property Value
Type | Description |
---|---|
NativeArray<Vector2> |
center
The 3D center point, in Unity world space.
Declaration
public Vector3 center { get; }
Property Value
Type | Description |
---|---|
Vector3 |
centerInPlaneSpace
The 2D center point, in plane space
Declaration
public Vector2 centerInPlaneSpace { get; }
Property Value
Type | Description |
---|---|
Vector2 |
classification
The classification of this plane.
Declaration
[Obsolete("classification has been deprecated in AR Foundation 6.0. Use classifications instead.")]
public PlaneClassification classification { get; }
Property Value
Type | Description |
---|---|
PlaneClassification |
classifications
The classifications of this plane.
Declaration
public PlaneClassifications classifications { get; }
Property Value
Type | Description |
---|---|
PlaneClassifications |
extents
The physical extents (half dimensions) of the plane in meters.
Declaration
public Vector2 extents { get; }
Property Value
Type | Description |
---|---|
Vector2 |
infinitePlane
Get the infinite plane associated with this ARPlane.
Declaration
public Plane infinitePlane { get; }
Property Value
Type | Description |
---|---|
Plane |
normal
Gets the normal to this plane in world space.
Declaration
public Vector3 normal { get; }
Property Value
Type | Description |
---|---|
Vector3 |
size
The physical size (dimensions) of the plane in meters.
Declaration
public Vector2 size { get; }
Property Value
Type | Description |
---|---|
Vector2 |
subsumedBy
The ARPlane which has subsumed this plane, or null
if this plane has not been subsumed.
Declaration
public ARPlane subsumedBy { get; }
Property Value
Type | Description |
---|---|
ARPlane |
vertexChangedThreshold
The largest value by which a plane's vertex could change before the mesh is regenerated. Units are in meters.
Declaration
public float vertexChangedThreshold { get; set; }
Property Value
Type | Description |
---|---|
float |
Events
boundaryChanged
Invoked when any vertex in the plane's boundary changes by more than vertexChangedThreshold.
Declaration
public event Action<ARPlaneBoundaryChangedEventArgs> boundaryChanged
Event Type
Type | Description |
---|---|
Action<ARPlaneBoundaryChangedEventArgs> |