/********************************************************************************
* DEVICE MANAGEMENT -> initialize, uninitialize, and update sensor
* ******************************************************************************/
//called on application start
private void Start()
{
NUIisReady = false;
//initialize Kinect sensor
NUIisReady = KinectWrapper.NuiContextInit(twoPlayer);
//display messages
if (NUIisReady)
{
Debug.Log("Sensor Initialized.");
}
else
{
Debug.Log("Could Not Initialize Sensor.");
}
if (scaleFactor == 0)
{
Debug.Log("WARNING: KUInterface.scaleFactor is set to zero. All joint positions will be the zero vector.");
}
//set up image memory
// seqTex = new byte[IM_W * IM_H * 4];
// cols = new Color32[IM_W * IM_H];
// texture = new Texture2D(IM_W, IM_H);
// seqDepth = new byte[IM_W * IM_H * 2];
// dcols = new Color32[IM_W * IM_H];
// depthImg = new Texture2D(IM_W, IM_H);
// depth = new short[IM_W][];
// for (int i = 0; i < depth.Length; i++) {
// depth[i] = new short[IM_H];
// }
}