Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HoloLens SpatialMapping not available

I'm working on the tutorial MR Basics 101: https://docs.microsoft.com/en-us/windows/mixed-reality/holograms-101

And set everythings up as suggested in this article: https://docs.microsoft.com/en-us/windows/mixed-reality/install-the-tools

But when I download the Origami sample and open it in Unity in the recommended version 2018.3.X or the other recommended Version the LTS I get the error:

Assets\Holograms\Support\Spatial Mapping\SpatialMapping.cs(24,13): error CS0246: The type or namespace name 'SpatialMappingRenderer' could not be found (are you missing a using directive or an assembly reference?)

Only when I open it in the Unity Version 2017.2.5f1 it does work. Does that mean that only in that version the HoloLens package is available? Or do I have to install it seperatly for the newer versions?

like image 468
NPadrutt Avatar asked Mar 19 '19 09:03

NPadrutt


People also ask

How does HoloLens do spatial mapping?

HoloLens blends holograms with your physical world. To do that, HoloLens has to learn about the physical world around you and remember where you place holograms within that space. Over time, the HoloLens builds up a spatial map of the environment that it has seen. HoloLens updates the map as the environment changes.

How does Spatial mapping work?

Spatial mapping makes it possible to place objects on real surfaces. This helps anchor objects in the user's world and takes advantage of real world depth cues. Occluding your holograms based on other holograms and real world objects helps convince the user that these holograms are actually in their space.

What is spatial mapping?

Spatial mapping (also called 3D reconstruction) is the ability to create a 3D map of the environment. It allows a device to understand and interact with the real world. Spatial mapping is useful for collision avoidance, motion planning, and realistic blending of the real and virtual world.

What is spatial mapping in psychology?

Definition. Spatial mapping is the ability to use a combination of external and internally-generated information (e.g., vision and proprioception) to construct a mental representation of the surrounding environment.


2 Answers

This is a "bug" in later versions of Unity 2018 and above when importing projects with an older version where those 2 classes are not automatically imported. Just go to XR Settings under Player settings and uncheck/check "Virtual Reality Supported". That will re-download the missing classes.

like image 55
Abdul Avatar answered Oct 13 '22 09:10

Abdul


If you use one of the older Mrtk-Versions you have to use the 2017 LTS-version of Unity. If you use MrtkVnext V1 or V2, you have to use Untiy 2018.

But all the tutorials from microsoft are done on Unity 2017 with the old Mrtk-Version, also known as HoloToolKit...there is some confusion regarding the naming.

like image 40
Perazim Avatar answered Oct 13 '22 10:10

Perazim