private void OnGUI() { if (audioCapture.status == CaptureStatus.STARTED) { if (GUI.Button(new Rect(10, Screen.height - 60, 150, 50), "Stop Capture")) { audioCapture.StopCapture(); } if (GUI.Button(new Rect(170, Screen.height - 60, 150, 50), "Cancel Capture")) { audioCapture.CancelCapture(); } } else { if (GUI.Button(new Rect(10, Screen.height - 60, 150, 50), "Start Capture")) { audioCapture.StartCapture(); } } if (GUI.Button(new Rect(Screen.width - 160, Screen.height - 60, 150, 50), "Browse")) { // Open video save directory Utils.BrowseFolder(audioCapture.saveFolder); } }
void Update() { if (Input.GetKeyDown(startCapture)) { audioCapture.StartCapture(); } else if (Input.GetKeyDown(stopCapture)) { audioCapture.StopCapture(); } }
void Update() { if (Input.GetKeyUp(startCapture)) { audioCapture.StartCapture(); } else if (Input.GetKeyUp(stopCapture)) { audioCapture.StopCapture(); } else if (Input.GetKeyUp(cancelCapture)) { audioCapture.CancelCapture(); } }
private void OnGUI() { if (audioCapture.captureStarted) { if (GUI.Button(new Rect(10, Screen.height - 60, 150, 50), "Stop Capture")) { audioCapture.StopCapture(); } } else { if (GUI.Button(new Rect(10, Screen.height - 60, 150, 50), "Start Capture")) { audioCapture.StartCapture(); } } if (GUI.Button(new Rect(Screen.width - 160, Screen.height - 60, 150, 50), "Open Audio Folder")) { // Open video save directory Process.Start(Config.saveFolder); } }