void Update() { if (Input.GetKeyUp(startCapture)) { sequenceCapture.StartCapture(); } else if (Input.GetKeyUp(stopCapture)) { sequenceCapture.StopCapture(); } else if (Input.GetKeyUp(cancelCapture)) { sequenceCapture.CancelCapture(); } }
private void OnGUI() { if ( sequenceCapture.status == CaptureStatus.READY) { if (GUI.Button(new Rect(10, Screen.height - 60, 150, 50), "Start Capture")) { sequenceCapture.StartCapture(); } } else if (sequenceCapture.status == CaptureStatus.STARTED) { if (GUI.Button(new Rect(10, Screen.height - 60, 150, 50), "Stop Capture")) { sequenceCapture.StopCapture(); } if (GUI.Button(new Rect(170, Screen.height - 60, 150, 50), "Cancel Capture")) { sequenceCapture.CancelCapture(); } } else if (sequenceCapture.status == CaptureStatus.PENDING) { if (GUI.Button(new Rect(10, Screen.height - 60, 150, 50), "Muxing")) { // Waiting processing end } } else if (sequenceCapture.status == CaptureStatus.STOPPED) { if (GUI.Button(new Rect(10, Screen.height - 60, 150, 50), "Encoding")) { // Waiting processing end } } if (GUI.Button(new Rect(Screen.width - 160, Screen.height - 60, 150, 50), "Browse")) { // Open video save directory Utils.BrowseFolder(sequenceCapture.saveFolder); } }