简体   繁体   中英

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:

  • MRTK.HoloLens2.Unity.Tutorials.Assets.MultiUserCapabilities.2.7.2.unitypackage

  • MRTK.HoloLens2.Unity.Tutorials.Assets.GettingStarted.2.7.2.unitypackage

  • MRTK.HoloLens2.Unity.Tutorials.Assets.AzureSpatialAnchors.2.7.2.unitypackage

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
在此处输入图像描述 在此处输入图像描述

I use Unity 2019.4.36f1

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM