void Start() { trackingIDs = new trackedBody[6]; for(int y = 0; y < trackingIDs.Length; y++) { trackingIDs[y] = new trackedBody(-1, false, 1); } coordinateCalibration = FindObjectOfType(typeof(RUISCoordinateCalibration)) as RUISCoordinateCalibration; _SourceManager = SourceManager.GetComponent<Kinect2SourceManager>(); _Sensor = _SourceManager.GetSensor(); if(_Sensor != null) { imageWidth = _Sensor.DepthFrameSource.FrameDescription.Width; imageHeight = _Sensor.DepthFrameSource.FrameDescription.Height; texture = new Texture2D(imageWidth / _DownsampleSize, imageHeight / _DownsampleSize); } }
void Start() { trackingIDs = new trackedBody[6]; for (int y = 0; y < trackingIDs.Length; y++) { trackingIDs[y] = new trackedBody(-1, false, 1); } coordinateCalibration = FindObjectOfType(typeof(RUISCoordinateCalibration)) as RUISCoordinateCalibration; _SourceManager = SourceManager.GetComponent <Kinect2SourceManager>(); _Sensor = _SourceManager.GetSensor(); if (_Sensor != null) { imageWidth = _Sensor.DepthFrameSource.FrameDescription.Width; imageHeight = _Sensor.DepthFrameSource.FrameDescription.Height; texture = new Texture2D(imageWidth / _DownsampleSize, imageHeight / _DownsampleSize); } }