HoloLens SpatialMapping not available
Asked Answered
S

2

5

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

And set everythings up as suggested in this article: https://learn.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?

Shiekh answered 19/3, 2019 at 9:28 Comment(0)
G
4

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.

Garfield answered 10/5, 2019 at 9:52 Comment(0)
Y
2

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.

Yanez answered 19/3, 2019 at 13:21 Comment(4)
As far as I can tell this example doesn't use the Mrtk. Also it doesn't work with the LTS, but you have to use one version before that. I assume the LTS move foward which changed something.Shiekh
What Mrtk/Htk-Package did you use? I have for example HoloToolkit-Unity-2017.4.3.0 and HoloToolkit-Unity-Examples-2017.4.3.0 and I'm working with Unity LTS 2017.4.17Yanez
As saied, as far as I can tell none. See here: github.com/Microsoft/HolographicAcademy/tree/Holograms-101Shiekh
ok, that some strange thing. Then I guess I cant help you. Didnt even know that this exists. And since I thought that you installed everything like in the article, I assumed that you used MRTK/Htk.Yanez

© 2022 - 2024 — McMap. All rights reserved.