Home > Net >  Unity World Locking Tools persistence not working on Hololens2
Unity World Locking Tools persistence not working on Hololens2

Time:12-10

I want to manually place and scale a hologram on an application for the HoloLens2. When I restart the application I want the hologram to be placed and orientated in the same pose relative to the real-world as placed in the previous session.

Starting recently, the documentation (https://learn.microsoft.com/en-us/windows/mixed-reality/develop/unity/spatial-anchors-in-unity?tabs=wlt) suggests to use World Locking Tools instead of World Anchors.

However, I cannot get the persistance across sessions on the same device (HoloLens2, HL) running. I tried the minimal example of World Locking Tools (https://microsoft.github.io/MixedReality-WorldLockingTools-Unity/DocGen/Documentation/HowTos/UsingWLT/JustWorldLock.html). But my hologram will always appear at the same position relative to the start pose of the HL.

What addional steps need to be performaned to have World Locking Tools save and load the manipulated hologram's transform (locally on the device)?

CodePudding user response:

I found the answer to the problem: I activated the development visualizer of World Locking Tools (WLT) and it showed that no anchors were created on the Hololens while in the unity simulation it seemed to work fine. Changing the XR Plugin Provider from OpenXR to Windows Mixed Reality solved the problem as WLT is not compatible with OpenXR. See Changing XR Plugin Provider for how to change the plugin in the project settings.

  • Related