Class ARPlaneMeshVisualizer
Generates a mesh for an ARPlane.
Inherited Members
UnityEngine.Component.GetComponentInParent<T>(System.Boolean)
UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
Namespace: UnityEngine.XR.ARFoundation
Syntax
[RequireComponent(typeof(ARPlane))]
public sealed class ARPlaneMeshVisualizer : MonoBehaviour
Remarks
If this component's GameObject has a MeshFilter and/or a MeshCollider, this component will generate a mesh from the BoundedPlane associated with the ARPlane.
It will also update a LineRenderer with the boundary points, if present.
MeshRenderer and LineRenderer components will only be enabled if:
- This component is enabled.
- The plane's trackingState is greater than or equal to trackingStateVisibilityThreshold.
- The ARSession's state is greater than Ready.
- hideSubsumed is
false
OR subsumedBy is notnull
.
Properties
hideSubsumed
Indicates whether subsumed planes should be rendered. (See subsumedBy.)
Declaration
public bool hideSubsumed { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
MeshRenderer and LineRenderer components will only be enabled if:
- This component is enabled.
- The plane's trackingState is greater than or equal to trackingStateVisibilityThreshold.
- The ARSession's state is greater than Ready.
- hideSubsumed is
false
OR subsumedBy is notnull
.
mesh
Get the Mesh that this visualizer creates and manages.
Declaration
public Mesh mesh { get; }
Property Value
Type | Description |
---|---|
Mesh |
trackingStateVisibilityThreshold
The threshold TrackingState that affects the visibility of the MeshRenderer and LineRenderer components.
Declaration
public TrackingState trackingStateVisibilityThreshold { get; set; }
Property Value
Type | Description |
---|---|
TrackingState |
Remarks
MeshRenderer and LineRenderer components will only be enabled if:
- This component is enabled.
- The plane's trackingState is greater than or equal to trackingStateVisibilityThreshold.
- The ARSession's state is greater than Ready.
- hideSubsumed is
false
OR subsumedBy is notnull
.