Spatial mapping API

Let's start at the bottom and work our way up. In this section, we will learn how to use low-level APIs to map and visualize our environment, and then, in the subsequent section, we will look at an alternative approach using the prebuilt components.

The class responsible for initiating and managing the mapping process is SurfaceObserver; this communicates its results to the registered delegates: SurfaceDataReadyDelegate and SurfaceChangedDelegate.

To start with, create a new empty GameObject via the GameObject | Create Empty menu item, rename the GameObject to SpatialMappingManager by selecting it in the Project window of the Hierarchy panel, right-clicking, and selecting the Rename option.

Unity's architecture is heavily ...

Get Microsoft HoloLens By Example now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.