Does SpatialUnderstanding work with Holographic Emulation in the Editor? How to test simulated room?

I have access to the HoloLens device at my university, but only at limited times, so I mostly want to test features of my project in the Unity Editor.

Currently, I’m trying to use SpatialUnderstanding, to return viable spawn positions for objects (e.g. "I need a 10x10 space on a wall, etc), but for unknown reasons none of the examples from the MixedRealityToolkit-Unity
seem to work when I test in the Editor using Unity’s Holographic Emulation.

It has a demo, where it prompts me to scan my surrounding, it doesn’t add scanned area to the SpatialUnderstanding components, and doesn’t return any positions at all. Generally, the Holographic Emulation feature works, I can see the mesh visualization, I can interact with colliders, etc, but the room scanning part only returns 0 for scanned surface area or any queried spawn position.

Is this supposed to work in the editor or do I have to scan a room with the real device to use the SpatialUnderstanding features?

SurfaceObserver should work just fine in the editor with simulation, so anything built on top of it (SpatialMappingCollider and SpatialMappingRenderer components, anything in the MixedRealityToolkit) should be fine. Unless they’ve fixed this more recently and I wasn’t aware, some things in the MixedRealityToolkit haven’t been fully updated to match recent changes in the APIs that Unity surfaces, but I don’t think anything related to spatial mapping has changed.

You mentioned that you can still see the meshes, interact with the colliders, etc. - I think this must mean that the Unity side of things is working correctly. Anything else that’s wrong is probably an issue with either the demo or the extra work that the MixedRealityToolkit does. The toolkit wasn’t written by any Unity dev though, so you’d probably have better luck asking around on the github site you linked than here.

1 Like