Search code examples
unity-game-engineaugmented-realityhololenswindows-mixed-realitymrtk

HoloLens: Spatial Mapping does nothing


Im trying the spatial mapping prefab and nothing is happening. I dont see the spatial mapping mesh and my cursor is also going through everything...

  • I enabled SpatialPerception
    enter image description here
  • I dragged the spatial mapping prefab into scene enter image description here
  • I created the layer Spatial Mapping under Layer 31 enter image description here
  • other settings
    enter image description here enter image description here

1. Edit: I tried the scene from the example package and it works fine. Set the whole scene up the same way in my project, but nothing happens. Could it be that Vuforia is the problem?
2. Edit: I imported Vuforia into the Example-Project and it still worked. So I guess Vuforia is not the reason.
3. Edit: Thought maybe .net 4.6 (experimental) could be the reason, but its not... can't find any other differences. Don't know what I'm missing
4. Edit & Solution: You're gonna get screwed if you think the hook under Spatial Perception in Unity works. You have to set it again after building the project in VS.


Solution

  • Ok, I found the solution after hours of searching for it....I doubted permissions and found that way the answer to my question. Even if Unity is checked for Spatial Perception, this does not mean that it is true. I builted the project and did not deploy it directly to my Hololens, but opened it with VS and checked in the manifest if Spatial Perception is set. Guess what!?! It was not activated, although it is activated in Unity. I set it in VS and now everything works....