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 Requestthen check Require Scene Anchor to enable permissions
Usage Guide
Add the
AR Plane Managercomponent to the XROrigin object in your scene. TheARPlaneManagercomponent is a plane tracking manager that detects and tracks flat surfaces in the physical environment, creating GameObjects for each detected plane.
Assign a
Plane Prefabto theAR Plane Manager. When a tracked plane is detected, the manager will instantiate thePlane PrefabGameObject. This prefab contains plane-related data and continuously updates the plane.The
Plane Prefabmust include bothAR PlaneandAR Plane Mesh Visualizercomponents for plane tracking and updates. Based on the functionality of theAR Plane Mesh Visualizerscript, addMesh Filter/Mesh Renderer/Line Renderercomponents to visualize the plane.
For detailed documentation of the plane detection component, see Unity's AR Foundation Plane Detection Documentation.