Search code examples
unity-game-engineaugmented-realityhololensmrtk

MRTK V2.2 - Spatial Mapping starts automatically


Updated to Mrtk 2.2 and now realizing that I cant disable spatial mapping at the start. I can disable it on runtime, but the checkbox under Spatial Awareness System Settings > Spatial Mesh Observer Settings > Startup Behavior is not working.

To reproduce

Set under Spatial Awareness System Settings > Spatial Mesh Observer Settings the value of Startup Behavior to manual start.

Screenshot

image

My Specs

  • Unity Version 2019,3
  • MRTK Version v2.2

What else I tried

Recreated my profiles; ported via guide;


Solution

  • This worked for me; I outcommented the content of Enable in line 147 under Assets\MixedRealityToolkit.Providers\WindowsMixedReality\WindowsMixedRealitySpatialMeshObserver.cs

     public override void Enable()
     {
         //if (!IsRunning)
         //{
         //    Resume();
         //}
     }