Holoens2开发报错记录02_通过主机获取彩色和深度数据流常见错误

01.E1696

E1696 无法打开源文件 "stdio.h"

解决方法:
更新一下SDK

1)打开Visual Studio Installer,点击修改

2)安装详细信息中自己系统对应的SDK,点击修改 即可

02.WinError 10060

方法来源

解决方法:

1.先看研究模式有没有打开。

2.Unity buildsetting中的几个InternetClient, InternetClientServer, PrivateNetworkClientServer, WebCam, SpatialPerception确认勾选上

03.DllNotFoundException: HL2RmStreamUnityPlugin

DllNotFoundException: HL2RmStreamUnityPlugin StreamerHL2.Start () (at Assets/Scripts/StreamerHL2.cs:12)Failed to pause IContinuousRecognitionSession (hr = 0x80131509)

解决方法:

1)确保HL2RmStreamUnityPlugin.dll文件存在于项目的Assets/Plugins/WSAPlayer/ARM64文件夹中,HL2RmStreamUnityPlugin.dll文件没有问题

2)在StreamerHL2.cs中,检查调用DLL的代码,确保名称正确

确定脚本正确挂载

cpp 复制代码
 [DllImport("HL2RmStreamUnityPlugin", EntryPoint = "Initialize", CallingConvention = CallingConvention.StdCall)]

3)清理并重新导入项目

删除Library文件夹(位于项目根目录),然后重新打开Unity。Unity会重新生成所有缓存文件。

在Unity编辑器中,右键点击Assets文件夹并选择Reimport All,确保所有资源重新导入。

4)加载原场景

在原场景运行前,可先取消StreamerHL2脚本复选框,运行没问题后再勾选运行

原场景(.unity文件)路径:

Assets文件夹

或者Assets/Scenes文件夹

相关推荐
悠远之空2 个月前
Hololens 2 Unity VS2019编译报错解决方案
unity·游戏引擎·hololens
@小杨同学.4 个月前
Unity开发Hololens项目
unity·游戏引擎·hololens
Eric Woo X6 个月前
HoloLens 坐标系统 Coordinate systems
hololens
王源骏9 个月前
unity开发Hololens 制作滑动框
unity·游戏引擎·hololens
王源骏9 个月前
Unity 开发Hololens,制作面板跟随眼镜一起移动,(面板跟踪)
unity·游戏引擎·hololens
王源骏9 个月前
unity开发Hololens,使用unity自带的UGUI
unity·游戏引擎·hololens
江心秋月_白1 年前
Hololens 2应用开发系列(2)——MRTK基础知识及配置文件配置(上)
hololens
江心秋月_白1 年前
Hololens 2应用开发系列(1)——使用MRTK在Unity中设置混合现实场景并进行程序模拟
unity·mr·hololens
TiAmo zhang2 年前
HoloLens 2设备MR 应用交互设计
ar·vr·mr·hololens