// Use this for initialization void Awake() { if (_instance == null) { _instance = this; } else { Destroy(this); } if (KinectSensor.CheckLibrary()) { _sensor = KinectSensor.GetDefault(); if (_sensor != null) { _bodyFrameReader = _sensor.BodyFrameSource.OpenReader(); if (!_sensor.IsOpen) { _sensor.Open(); } } } }