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

Unity MRTK场景理解DllNotFound报错及临时解决方法咨询

Unity + MRTK 开发场景理解模块相关问题

遇到的错误

  • DllNotFoundException: Microsoft.MixedReality.SceneUnderstanding.dll,报错位置:Library/PackageCache/com.microsoft.mixedreality.sceneunderstanding@7bfd3a8ea18c/Editor/Microsoft.MixedReality.SceneUnderstanding.cs:1179
  • 提示无法访问Scene Understanding Observer,需将构建目标设置为Universal Windows Platform(UWP),但已设置为UWP仍出现该错误

异常现象与怀疑点

场景启动时,Inspector面板中的MixedRealityToolkit组件会自动关闭,手动开启后功能恢复正常。怀疑是以下代码导致组件关闭:

public static async System.Threading.Tasks.Task<Microsoft.MixedReality.SceneUnderstanding.SceneObserverAccessStatus> RequestAccessAsync()
{
    return await Task.Run(() =>
    {
        Microsoft.MixedReality.SceneUnderstanding.SceneObserverAccessStatus result;
        Microsoft.MixedReality.SceneUnderstanding.NativeLibraryHelpers.CheckStatus(Microsoft.MixedReality.SceneUnderstanding.NativeLibrary.su_scene_observer_request_access_async(out result));
        return result;
    });
}

尝试修改该代码后仍报错,判断DLL缺失是核心问题。

当前临时解决方法

添加以下代码强制开启组件以忽略错误:

GameObject.Find("MixedRealityToolkit").GetComponent<MixedRealityToolkit>().enabled = true;

咨询问题

  1. 该临时解决方法是否合理?
  2. 问题的根源是什么?

内容的提问来源于stack exchange,提问作者LOUIS KIM

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.16 13:05:23