You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure Spatial Anchors是否支持Unity全息远程?遇DllNotFound错误求助

解决Unity Play模式下Holographic Remoting运行Azure Spatial Anchors的DllNotFoundException错误

错误原因

DllNotFoundException: AzureSpatialAnchors 通常是因为Azure Spatial Anchors的原生库未针对PC平台(或Unity Play模式环境)正确配置或加载。Azure Spatial Anchors的Unity包针对不同平台(如UWP、PC x64)提供了不同的原生动态链接库,Play模式下若未正确导入PC对应的库,就会触发该错误。

解决步骤

  • 检查平台架构与库配置

    1. 在Unity编辑器中打开File > Build Settings,将目标平台设置为PC, Mac & Linux Standalone,确保架构选择x64。
    2. 打开Window > Package Manager,找到Azure Spatial Anchors包,确认已安装对应PC平台的依赖库。
    3. 前往项目的Assets/Plugins文件夹,找到所有与AzureSpatialAnchors相关的DLL文件,选中后在Inspector面板中设置:
      • 勾选PC, Mac & Linux Standalone下的x64选项
      • 确保Include in Build和Include in Editor均处于勾选状态
  • 配置Holographic Remoting与Player Settings

    1. 在Unity的Player Settings > Other Settings中,将Scripting Runtime Version设置为.NET 4.x Equivalent,部分原生库依赖该运行时版本。
    2. 确认已正确启用Holographic Remoting:在Window > XR Plugin Management > Microsoft HoloLens中,勾选Holographic Remoting选项,并配置好Remoting连接参数。
  • 备选方案:发布UWP后通过Remoting运行
    如果Play模式下的库加载问题无法解决,可以先将项目发布为UWP应用(目标设备选择HoloLens),再通过PC上的Holographic Remoting App连接运行。这种方式更贴合实际部署环境,能避免Play模式下的环境差异问题。

关于场景支持

PC通过Holographic Remoting运行Azure Spatial Anchors是官方支持的场景,并非只能发布到HoloLens 2设备。核心问题在于Play模式下的库配置,按上述步骤调整后通常能解决DLL加载错误。


内容的提问来源于stack exchange,提问作者Leon Lai LeonMK

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.09 11:35:13