Microsoft Kinect SDK Wrapper For Unity Crash Bug Fix
2023-09-14 08:57:15 时间
There’s a great free Kinect SDK wrapper available for Unity. It’s free open source but there are still a few
problems getting it to run with the 1.0 SDK (as opposed to the beta).
The first problem is that it is pointing to the wrong dll file. When you get this exception:
iOS Xcode11打包失败IPA processing failed 更新到Xcode11后修改了点bug,一直没有打包,今天打包发现失败了,提示IPA processing failed,查看日志:IDEDistribution.standard.log
DllNotFoundException: C:\Program Files (x86)\Microsoft Research KinectSDK\MSRKINECTNUI.DLLYou should open the file KinectInterop.cs and changes all dll paths to:
C:\Windows\System32\Kinect10.dllThis will fix all compiler errors and it should run without problems. However, it will only run once. When you run it the second time Unity will freeze and you will have to kill the process. Not very convenient. This is caused by a bug in the Microsoft SDK. According to this page the problem is:
If C++ code is executing NuiInitializa/NuiShutdown multiple times through the applications lifetime, SetDeviceStatusCallback should be called once, before invoking those calls.So apparently a single call to SetDeviceStatusCallback() should fix the problem. To be able to call this method we need to add some code to theKinectInterop.cs file. First of all we need to add an empty struct:
public struct NuiStatusProcThen we need to link the native method. In the NativeMethods class add:
[DllImportAttribute(@"C:\Windows\System32\Kinect10.dll", EntryPoint = "NuiSetDeviceStatusCallback")] public static extern void NuiSetDeviceStatusCallback(NuiStatusProc callback);Now open the file KinectSensor.cs and add this line to the void Awake()method (just before the line “catch (Exception e)”):
NativeMethods.NuiSetDeviceStatusCallback(new NuiStatusProc());Now everything should run fine. If it doesn’t let me know :O reference: http://www.rozengain.com/blog/2012/05/10/microsoft-kinect-sdk-wrapper-for-unity-crash-bug-fix/
iOS Xcode11打包失败IPA processing failed 更新到Xcode11后修改了点bug,一直没有打包,今天打包发现失败了,提示IPA processing failed,查看日志:IDEDistribution.standard.log
相关文章
- android sdk manager安装,Android SDK Manager安装过程
- python重复执行10次_卡bug
- 记一次bug分析过程,并随之引发的思考
- TCP聊天文件服务器v2.0 - 重大bug修复+PyQt5文件传输可视化
- 为啥程序会有bug?
- K8S 生态周报| containerd 存在 bug 会导致 Pod 被重启,建议升级
- Linux下安装SDK环境必备步骤(linux安装sdk环境)
- 安装Linux下的SDK:一步一步指南(linux下安装sdk)
- MySQL性能恶化:从Bug调查到解决(mysqlbug)
- 安装 Linux SDK,让技术更上一层楼(linux安装sdk)
- Linux下SDK:开启开发之门(sdk是什么linux)
- 谷歌修复了FFmpeg中上千个bug
- 利用编译器Bug的可抵赖后门
- [图]Windows 11 Build 22000.120发布:新增Family小部件 修复诸多BUG
- 盛派SDK助力Redis高效存储(盛派sdk redis)
- Oracle临时表BUG 遭遇不测崩溃惊魂(oracle临时表bug)
- 破解Oracle数据库修复Bug问题(oracle修改bug)
- Redis锁出现Bug,怎么办(redis锁bug)
- 如何设置Oracle SDK的路径(oracle sdk路径)
- Oracle Bug文档之调查这些bug有何秘密(oracle bug文档)
- 苹果尴尬了: iOS 10.2.1 被爆致命 bug,怎么办?(附建议及测试视频)
- IE在DOM操作有表单控件时的bug