简体   繁体   English

ObjectAnchorsWorldManager.cs 错误:命名空间 UnityEngine.XR 中不存在类型或命名空间名称 WindowsMR

[英]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 LTSOpen XR进行开发。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误CS0234:类型或名称空间名称“持久性”在名称空间“ UnityEngine.XR.WSA”中不存在(您是否缺少程序集引用?) - error CS0234: The type or namespace name 'Persistence' does not exist in the namespace 'UnityEngine.XR.WSA' (are you missing an assembly reference?) 错误 CS0234:命名空间“UnityEngine.XR.WSA”中不存在类型或命名空间名称“WorldAnchor”(您是否缺少程序集引用?) - error CS0234: The type or namespace name 'WorldAnchor' does not exist in the namespace 'UnityEngine.XR.WSA' (are you missing an assembly reference?) 命名空间“UnityEngine”中不存在 Unity 类型或命名空间名称“InputSystem” - Unity type or namespace name 'InputSystem' does not exist in the namespace 'UnityEngine' 如何修复错误 CS0234:命名空间“UnityEngine”中不存在类型或命名空间名称“Probuilder”(您是否缺少程序集引用? - How to fix error CS0234: The type or namespace name 'Probuilder' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference? 错误 CS0246:找不到类型或命名空间名称“UnityEngine” - error CS0246: The type or namespace name 'UnityEngine' could not be found 命名空间“UnityEngine.Rendering”中不存在类型或命名空间名称“PostProcessing” - The type or namespace name `PostProcessing' does not exist in the namespace `UnityEngine.Rendering' "命名空间“UnityEngine”中不存在类型或命名空间名称“UI”" - The type or namespace name 'UI' does not exist in the namespace 'UnityEngine' Unity 中的命名空间“UnityEngine”中不存在类型或命名空间名称“Windows” - The type or namespace name `Windows' does not exist in the namespace `UnityEngine' in Unity Unity 类型或命名空间名称“空间跟踪”在命名空间“UnityEngine”中不存在 - Unity type or namespace name 'Spatial Tracking' does not exist in the namespace 'UnityEngine' 命名空间“UnityEngine.Experimental”中不存在类型或命名空间名称“Input” - The type or namespace name 'Input' does not exist in the namespace 'UnityEngine.Experimental'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM