[英]error CS0234: The type or namespace name 'WorldAnchor' does not exist in the namespace 'UnityEngine.XR.WSA' (are you missing an assembly reference?)
I used remote rendering model and add it to my project but i got a lot of errors.我使用远程渲染 model 并将其添加到我的项目中,但出现了很多错误。 And now these 2 errors stay and I cannot find a solution.现在这两个错误仍然存在,我找不到解决方案。
When I made a new project only to test the remote rendering it works fine but when I add it to my project, many errors appear.当我创建一个新项目只是为了测试远程渲染它工作正常,但是当我将它添加到我的项目时,会出现许多错误。 How do I fix these errors?如何修复这些错误?
1- Library\PackageCache\com.microsoft.azure.spatial-anchors-sdk.core@2.7.2\Runtime\Scripts\SpatialAnchorExtensions.cs(21,41): error CS0234: The type or namespace name 'WorldAnchor' does not exist in the namespace 'UnityEngine.XR.WSA' (are you missing an assembly reference?) 1-Library\PackageCache\com.microsoft.azure.spatial-anchors-sdk.core@2.7.2\Runtime\Scripts\SpatialAnchorExtensions.cs(21,41):错误 CS0234:类型或命名空间名称“WorldAnchor”不存在于命名空间“UnityEngine.XR.WSA”中(您是否缺少程序集引用?)
2- Library\PackageCache\com.microsoft.azure.spatial-anchors-sdk.core@2.7.2\Runtime\Scripts\CloudNativeAnchor.cs(13,41): error CS0234: The type or namespace name 'WorldAnchor' does not exist in the namespace 'UnityEngine.XR.WSA' (are you missing an assembly reference?) 2- Library\PackageCache\com.microsoft.azure.spatial-anchors-sdk.core@2.7.2\Runtime\Scripts\CloudNativeAnchor.cs(13,41):错误 CS0234:类型或命名空间名称“WorldAnchor”不存在于命名空间“UnityEngine.XR.WSA”中(您是否缺少程序集引用?)
I am using the last version of unity 2020.我正在使用最新版本的 unity 2020。
Because you are using Azure Spatial Anchors SDK version 2.7 and according to Building in Unity with Azure Spatial Anchors |因为您使用的是 Azure 空间锚 SDK 版本 2.7 并根据Building in Unity with Azure 空间锚 | Microsoft Docs you need to use Unity 2019.4 or update Azure Spatial Anchors SDK version to 2.9 or later. Microsoft Docs您需要使用 Unity 2019.4 或将 Azure 空间锚 SDK 版本更新到 2.9 或更高版本。
The Azure Spatial Anchors SDK versions 2.8 or earlier do not support the Unity XR Plug-in Framework and should be configured in Unity 2019.4 (LTS) Azure 空间锚 SDK 2.8 或更早版本不支持 Unity XR 插件框架,应在 Unity 2019.4 (LTS) 中配置
The Azure Spatial Anchors SDK for version 2.9 or later should be configured in Unity 2020.3 (LTS) with the Unity XR Plug-in Framework 2.9 或更高版本的 Azure 空间锚 SDK 应使用 Unity XR 插件框架在 Unity 2020.3 (LTS) 中配置
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.