
- Using visual understanding environment layer how to#
- Using visual understanding environment layer full#
- Using visual understanding environment layer windows#
Specify the region of space that each SurfaceObserver object provide datas for by calling SetVolumeAsSphere, SetVolumeAsAxisAlignedBox, SetVolumeAsOrientedBox, or SetVolumeAsFrustum. Instantiate one SurfaceObserver object for each application-defined region of space that you need spatial mapping data for. We've outlined the suggested flow for an application that uses the spatial mapping APIs in the sections below. Types: SurfaceObserver, SurfaceChange, SurfaceData, SurfaceId If you need more control than the Spatial Mapping Renderer and Spatial Mapping Collider components offer, use the low-level Spatial Mapping APIs. Using the low-level Unity spatial mapping API To do higher-level mesh analysis, see the section below about the SpatialUnderstanding library in MixedRealityToolkit.To do your own lower-level mesh processing, see the section below about the low-level Spatial Mapping script API.When you want to go further, there are two main paths to explore: These components make it drag-and-drop easy to get started with Spatial Mapping. Going beyond the built-in spatial mapping components
Using visual understanding environment layer how to#
You can find more details on how to use these components at the Unity documentation site. In the Inspector window, Add Component > XR > Spatial Mapping Collider or Spatial Mapping Renderer.Select a GameObject at the center of the area in which you'd like to detect spatial surface meshes.To use these two components in your Unity app: You may add both components to your app if you'd like to both visualize and interact with physical surfaces. Using the built-in spatial mapping components The Spatial Mapping Collider allows for holographic content (or character) interaction, such as physics, with the spatial mapping mesh. The Spatial Mapping Renderer allows for visualization of the spatial mapping mesh. Unity offers two components for easily adding spatial mapping to your app, Spatial Mapping Renderer and Spatial Mapping Collider. Getting started with Unity's built-in spatial mapping components All of these other extensions can be found in Unity's documentation.
Using visual understanding environment layer windows#
Windows XR Plugin provides some additional extension methods for configuring the XRMeshSubsystem, such as setting a bounding sphere or accessing the underlying platform mesh representation. If you'd rather work with Unity's XRMeshSubsystem directly, see Unity's documentation for more information on usage. See Unity's documentation for more information on usage. Unity's ARFoundation provides an ARMeshManager component for built-in visualization of spatial meshes.

In MRTK, look at the Spatial awareness getting started guide for information on setting up various spatial mesh observers.įor information on on-device observers, look at the Configuring mesh observers for device guide.įor information on scene understanding observers, look at the Scene understanding observer guide.

In the Unity Editor, open the "Player Settings" pane (Edit > Project Settings > Player).How to enable the SpatialPerception capability: In order for an app to consume spatial mapping data, the SpatialPerception capability must be enabled.

To use spatial mapping in your app, the SpatialPerception capability needs to be set in your AppxManifest.
Using visual understanding environment layer full#
