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

Clarify XR Plugin versions supported #98

Closed fast-slow-still closed 3 years ago

fast-slow-still commented 3 years ago

The Unity XR Plugin version matching is a fragile process. The documents should at least list explicitly version combinations that have been found to work.

Bonus points for listing guidance on version combinations that are expected to work, but haven't been tried (i.e. versions not yet released).

zantiu commented 3 years ago

Are you sure that the combination in the docs is correct? https://github.com/microsoft/MixedReality-WorldLockingTools-Unity/blob/master/DocGen/Documentation/HowTos/XRSDK.md

XR Plugin Management (tested v3.2.16, expected v3.X.Y, X>=2). AR Subsystems (tested v2.1.3, expected v2.X.Y, X>1). AR Core XR Plugin (tested v2.1.12, expected v2.X.Y, X>1). AR Foundation (tested v2.1.10, expected v2.X.Y, X>1).

Shouldn't AR Core XR Plugin be v2.1.2? I only could make V2.1.12 work by:

Switching back to 2.1.2 removed the need to make all these changes. (2.1.2 is mentioned in the docs of AR Foundation v2.1.10: https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@2.1/manual/index.html)

zantiu commented 3 years ago

Actually 2.1.2 also doesn't work. I got the error described in the change log under 2.1.8: https://docs.unity3d.com/Packages/com.unity.xr.arcore@2.1/changelog/CHANGELOG.html

Maybe because I'm on Unity 2019.4.15.f1c1?

Anyway AR Core XR Plugin 2.1.8 works without customizing the gradle settings.

However it doesn't seem to work anymore after deploying to my phone: no camera and no tracking. 'Initizalize XR on startup' and 'ARCore' are both checked in Project Settings.

Do you have a sample project with WLT that is both working with Hololens 2 and Android?

fast-slow-still commented 3 years ago

Yes, the versions in the doc are correct. They are, of course, only suggestions. This section mentions that you need to customize the gradle settings: https://microsoft.github.io/MixedReality-WorldLockingTools-Unity/DocGen/Documentation/HowTos/XRSDK.html#setup-for-arcore-xr-plugin-android See the bit at the end of the section about "manifest-merger failed".

The World Locking Tools project works on both HoloLens 2 and Android. I most frequently run the WorldLockedPhysicsSample scene, because it has the best diagnostics and the broadest use of features. Other scenes work too, but are more limited by their UX being HoloLens centric.

Is there a reason you don't want to customize the gradle settings to use the more up-to-date ARCore? That means you can't get any advancement or fixes until switching to U2020.

When you built the app for your phone, did you remember to switch to the "AR MixedRealityToolkitConfigurationProfile" profile in MRTK? If so, then after switching, did you run Mixed Reality Toolkit -> Utilities -> UnityAR -> Update scripting defines.

I suggest that you decouple getting your application to run on HL2 and Android from WLT. It might be easier to get your base application running on HL2 and Android, preferably by leveraging MRTK, then add WLT. Feedback you have on using MRTK to target HL2 and Android would be great to give the MRTK team. Definitely include the "XR SDK" label. https://github.com/microsoft/MixedRealityToolkit-Unity/issues

zantiu commented 3 years ago

Forgot the 'Update scripting defines'! Thanks!

Actually customizing the gradle settings is fine, I just thought that it was not needed and I was maybe complicating things.

fast-slow-still commented 3 years ago

Great! Glad to hear it. I agree that it is currently a brittle process. I hope that it becomes more developer friendly as it evolves. All the more reason for us to share our feedback with the Unity and MRTK teams.