IEnumerator AttemptToRecord() { yield return(new WaitForSeconds(holdTimeToStartRecording)); recordingAttempt = null; cameraRecorder.StartRecording(appCamera); recordingIndicator.SetActive(true); OnStartedTakingFootage.Invoke(); }
public void OnCameraButtonClick() { float timeDiff = Time.time - timeAtCameraButtonPressed; timeAtCameraButtonPressed = 0f; if (timeDiff <= holdTimeToStartRecording) { StopRecordingAttempt(); pictureFrame.SetActive(true); OnStartedTakingFootage.Invoke(); cameraRecorder.TakePicture(); } else { cameraRecorder.StopRecording(); recordingIndicator.SetActive(false); } }