Closed SharpEdgeMarshall closed 12 years ago
You're right! It seems that the Kinect SDK doesn't like it when you uninit the sensor and then re-init it in the same application. Since the Unity editor is running constantly, it thinks it's still being used and won't re-init. It just crashes. I'll fix this asap! Thanks for your help! -Andrew
Date: Fri, 16 Mar 2012 09:04:09 -0700 From: reply@reply.github.com To: adevine@knights.ucf.edu Subject: [KinectSDK-Unity3D_Interface_Plugin] Unity Freeze on 2nd execution (#2)
The wrapper start and quit correctly but on the 2nd run Unity freeze. From the debugger i see that it never returns from "NUIisReady = KinectWrapper.NuiContextInit(twoPlayer);" call.
Reply to this email directly or view it on GitHub: https://github.com/adevine1618/KinectSDK-Unity3D_Interface_Plugin/issues/2
Ok it's been fixed with a trade-off. The sensor remains on after you first push "play." So, be sure to disconnect your sensor after you're done using Unity. When you build your project into an executable, this no longer becomes an issue since you are completely closing the application after each init of the sensor. -Andrew
Thank you adevine i was starting to think that i was missing something. Happy to help you
There's a new problem now :) Unity freezes as before because you call KinectWrapper.NuiContextInit(); but kinect is yet initialized. Infact if i comment out the call on the 2nd run it works.
Sorry for bad english.
Did you replace KUInterface.dll along with the C# file? There is a provision within the dll (with the new version) that prevents it from re-initializing if it already contains a handle to an active sensor.
oh you are right i've not replaced it. Now it's my fault.
Keep up the good work!
Haha no problem, happy to help
The wrapper starts and quits correctly but on second run Unity freeze. From the debugger i can see that it never returns from "NUIisReady = KinectWrapper.NuiContextInit(twoPlayer);" call.
I suppose there's something wrong with the Uninit.