unity3d 未找到MRTK光子统一网络'AnchorModuleScript'命名空间

rryofs0p  于 2022-12-13  发布在  其他
关注(0)|答案(2)|浏览(365)

While following the mrtk tutorial on multi-user capabilities , there has been one CS0246 error that I haven't been able to avoid.
After importing PUN 2 from the asset store, all CS0246 errors from importing the MultiUserCapibilities package are resolved except for Assets\MRTK.Tutorials.MultiUserCapabilities\Scripts\SharingModuleScript.cs(7,17): error CS0246: The type or namespace name 'AnchorModuleScript' could not be found (are you missing a using directive or an assembly reference?) .
I have followed this tutorial with my current project on Unity 2020.3.29f, the same project updated to Unity 2021, and a blank Unity 2020 LTS project following only the essential steps (switching build platform, importing MRTK foundation and OpenXR through the feature tool, and setting up MRTK and OpenXR in Unity). All of them only throw this one error. I also updated my Windows SDK and restarted my PC as many other solutions suggest.
My best guess is that this is something on Microsoft's end.

  • Windows 10 21H2 (OS Build 19044.1645)
  • Windows SDK version 2104 (10.0.20348.0)
  • Unity 2020.3.29f1
  • MRTK 2.7.3
  • OpenXR 1.4.0
pw136qt2

pw136qt21#

安装this Unity软件包。
微软假设你已经完成了'Use Azure Spatial Anchors to anchor objects in the real world'教程(在第三页下载了该软件包),这是'HoloLens 2 fundamentals'教程的一部分。微软还声明,完成这些教程是多用户功能教程的先决条件:screenshot

cbwuti44

cbwuti442#

我也遇到过同样的问题,现在已经解决了。
在添加mrtk tutorial中列出的关于多用户功能的包之前,需要安装几个包。
我通过安装HoloLens 2 fundamentals: develop mixed reality applications中所有步骤的Unity包解决了这个问题,你只需要进入每个学习模块的前2个步骤,并按顺序安装它们列出的Unity包。
简而言之,您需要遵循本教程的前提条件。最后,您的“项目”选项卡应类似于以下内容:Screenshot

相关问题