unity-game-enginehololensmrtkunity-xr

ObjectAnchorsWorldManager.cs error : type or namespace name WindowsMR does not exist in the namespace UnityEngine.XR


I'm following the tutorial from Microsoft in order to create a multi-users experience in augmented reality between an Hololens and an Android app.

After installing the following packages :

and following the tutorial, I can launch the app in the Unity Editor with no issue and I can see a message indicating "number of players in the experience: 1".

The problem
When I try to build the app in order to launch it on the Hololens, I get the following error which cause the build to fail :

Library\PackageCache\com.microsoft.azure.object-anchors.runtime@f40a6f902078-1669719345205\Runtime\Core\ObjectAnchorsWorldManager.cs(151,29): error CS0234: The type or namespace name 'WindowsMR' does not exist in the namespace 'UnityEngine.XR' (are you missing an assembly reference?)

What I've tried
I tried to re-import the XR Plug-in
enter image description here enter image description here

I use Unity 2019.4.36f1


Solution

  • I think I already mentioned in your last thread that this sample should run on Unity 2020 LTS + Open XR. And both the Azure Spatial Anchor used in this sample and the Azure Object Anchor you are using are recommended to use Unity 2020.3 LTS + Open XR.

    For this error message, it requires the Windows XR Plugin, but this project was not created with this, so a series of error messages may appear when importing this package. It is still recommended that you use Unity 2020.3 LTS and Open XR for development.