/// <summary> /// Start /// Unity Standard Method. Use to initialize the gameloop components. /// </summary> private void Start() { recognizer = GameObject.FindObjectOfType <KinectOverlay.RecognizeGesture>(); if (recognizer != null) { if (gesturesToCheck != null) { numberOfSuccessPerGesture = new int[gesturesToCheck.Count]; } if (gestureComparisonUI != null) { if (gesturesToCheck != null) { gestureComparisonUI.UpdateExpectedGestureText(gesturesToCheck[0]); } else { gestureComparisonUI.UpdateExpectedGestureText(GesturesForDemo.NONE); } } trialsPerGesture = Mathf.Max(1, trialsPerGesture); currentTrial = 0; processingGesture = false; } else { Debug.LogError("Error, no RecognizeGesture component can be found. Recognition can't be done without it."); } }
/// <summary> /// Start /// Unity Standard Method. Use to initialize the gameloop components. /// </summary> void Start() { recognizer = GameObject.FindObjectOfType <KinectOverlay.RecognizeGesture>(); if (recognizer != null) { processingGesture = false; lastRecognizedGesture = GesturesForDemo.NONE; if (recognitionUI != null) { recognitionUI.UpdateRecognizedGesture(GesturesForDemo.NONE); } } else { Debug.LogError("Error, no RecognizeGesture component can be found. Recognition can't be done without it."); } }