private IEnumerator RecognitionRoutine() { while (enabled) { yield return(interval); if (cameraDevice.Playing) { faceRecognitionController.Recognize(cameraDevice.GetTexture()); } } }