Plane Detection
Plane detection refers to detecting and tracking flat surfaces in the physical environment. Using components in AR Foundation, you can control plane detection functionality in your application and create ARPlane trackers for each detected surface.
Requirements
Requires Play For Dream MR devices with OS 3.1.0 or later
Plane detection depends on Scene permissions. Navigate to:
Edit > Project Settings
>XR Plug-in Management
>YVR
>Feature Request
then check Require Scene Anchor to enable permissions
Usage Guide
Add the
AR Plane Manager
component to the XROrigin object in your scene. TheARPlaneManager
component is a plane tracking manager that detects and tracks flat surfaces in the physical environment, creating GameObjects for each detected plane.Assign a
Plane Prefab
to theAR Plane Manager
. When a tracked plane is detected, the manager will instantiate thePlane Prefab
GameObject. This prefab contains plane-related data and continuously updates the plane.The
Plane Prefab
must include bothAR Plane
andAR Plane Mesh Visualizer
components for plane tracking and updates. Based on the functionality of theAR Plane Mesh Visualizer
script, addMesh Filter
/Mesh Renderer
/Line Renderer
components to visualize the plane.
For detailed documentation of the plane detection component, see Unity's AR Foundation Plane Detection Documentation.