This example shows how to save the meshes generated using the Spatial Mapping and Spatial Understanding components directly on the HoloLens.
Underneath the hood SpatialMappingObserver contains a new method, SaveSpatialMeshes(string fileName). Calling this function with a string name will save a enumeration of meshes to a .room file on the HoloLens.
Adds a button for quickly accessing the AppData folder of the Unity project. This is the directory where the FileSurfaceObserver looks for .room files to load.
SaveSpatialMapping and SaveSpatialUnderstanding scenes are setup exactly the same, except they are using the different spatial meshes.
Tip for testing: Add both scenes to be built into the application. The LevelManager script will make it easy to navigate between scenes if you say, "Load Next Scene". Therefore you can just install the app once and capture the meshes from the different scenes. The Room (.room) files are saved out different for each scene so you will not overwrite the other mesh.
Process: Scan, save, download, and load.
After following a demo to download a .room file you will be able to convert that .room file to a Wavefront (.obj). This flow is based off the highlighted selection within Unity's Hierarchy panel.
Process: Select GameObject(s) with MeshFilters then export.
Note that this could be done while in play mode. Therefore you could enter play mode, load any saved spatial meshes, select said meshes in the hierarchy panel, then export selection to file.
After following a demo to download a .room file you will be able to convert that .room file to a Wavefront (.obj). In this particular process it will directly reference the Room (.room) files saved on the HoloLens.
Process: Download then export.