[英]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.我正在按照 Microsoft 的教程进行操作,以便在 Hololens 和 Android 应用程序之间创建增强现实中的多用户体验。
After installing the following packages:安装以下软件包后:
MRTK.HoloLens2.Unity.Tutorials.Assets.MultiUserCapabilities.2.7.2.unitypackage 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.GettingStarted.2.7.2.unitypackage
MRTK.HoloLens2.Unity.Tutorials.Assets.AzureSpatialAnchors.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".按照教程,我可以在 Unity 编辑器中启动该应用程序,没有任何问题,我可以看到一条消息,指示“体验中的玩家数量: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:当我尝试构建应用程序以便在 Hololens 上启动它时,出现以下导致构建失败的错误:
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我尝试重新导入 XR 插件
I use Unity 2019.4.36f1我使用 Unity 2019.4.36f1
I think I already mentioned in your last thread that this sample should run on Unity 2020 LTS + Open XR .我想我已经在你的上一个线程中提到这个示例应该在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 .并且本例中使用的Azure Spatial Anchor和您使用的Azure Object Anchor均推荐使用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.对于这个报错信息,需要Windows XR Plugin ,但是这个项目不是用这个创建的,所以导入这个package的时候可能会出现一系列的报错信息。还是建议大家使用Unity 2020.3 LTS和Open XR进行开发。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.