microsoft / MixedReality-WorldLockingTools-Unity

Unity tools to provide a stable coordinate system anchored to the physical world.
https://microsoft.github.io/MixedReality-WorldLockingTools-Unity/README.html
MIT License
188 stars 45 forks source link

Persistence of world locking state doesn't seem to be working #273

Closed JeffreyR-1746919 closed 2 years ago

JeffreyR-1746919 commented 2 years ago

When running the WorldLockingBasic example, persistence doesn't work with auto-save enabled, nor when I try to save manually. Everything just resets whenever I completely restart the built app. However, the AnchorManager SupportsPersistence boolean is true.

I'm running Unity version 2020.3.22f1 on HoloLens 2, with Mixed Reality Toolkit v2.7.3, WLT v1.5.7, and using Windows Mixed Reality, all installed using the Mixed Reality Feature Tool.

fast-slow-still commented 2 years ago

Can you tell me what XR pipeline your project is targetting? E.g. Legacy XR, or XR SDK w/ MR OpenXR Plugin, or AR Foundation.

The problem might be that the WorldLockingContext is set for a non-matching pipeline. In the samples it is mostly set to WSA, which is no longer supported on Unity 2020.

An easy way to make sure it is set to the correct Anchor Subsystem is to run the configuration script.

https://docs.microsoft.com/en-us/mixed-reality/world-locking-tools/documentation/howtos/usingwlt/justworldlock#automated-setup

If you run that and are still having a problem, having a look at your UnityPlayer.log might help me figure out what's going wrong. Let me know either way. Thanks!

JeffreyR-1746919 commented 2 years ago

Thanks! I am using XR SDK, and even though I had already set the anchor subsystem to XR SDK, running the script seems to have fixed the issue.

fast-slow-still commented 2 years ago

Awesome, thanks for the update!

mrvnbrk commented 2 years ago

Hi, I had exactly the same problem and was able to solve it this way. But now I get "Lost Tracking" displayed. Did you have this too, or do you know how to solve the problem? Thanks!

BookSadprasid commented 2 years ago

I am facing the same issue with "Lost Tracking" after using the Automated Setup script. See #300 for more details.

JeffreyR-1746919 commented 2 years ago

In the end I created my application with OpenXR, because I still had some issues with XR SDK. I can't remember what the issues were but it might have also been the "Lost Tracking" thing. Don't forget to update OpenXR on your HoloLens 2 device if you decide to go down this route, because before updating I also had issues with WLT not working correctly.