在用于统一的kinect 1.7包装程序包中,当在场景之间切换时,我收到错误“只能有一个kinectsensor实例。”任何人都可以提出解决方案吗?
答案 0 :(得分:0)
从此
更改脚本if (KinectSensor.instance != null)
{
Debug.Log("There should be only one active instance of the KinectSensor component at at time.");
throw new Exception("There should be only one active instance of the KinectSensor component at a time.");
}
到
if (KinectSensor.instance != null)
{
Debug.Log("There should be only one active instance of the KinectSensor component at at time.");
KinectSensor.instance = null; // Add this one
}
如果这不起作用,可能会在转移到第二个场景时删除第一个场景的相机。