// Update is called once per frame private void Start() { GUIState = PlayerPrefs.GetInt("GUIState", 1); GUI = GameObject.Find("UI"); if (GUIState == 1) { GUI.SetActive(true); } else { GUI.SetActive(false); } PauseMenuGUI = transform.Find("pause").gameObject; CameraMenuGUI = transform.Find("CameraMenu").gameObject; RecordMenuGUI = transform.Find("recordmenu").gameObject; Time.timeScale = PlayerPrefs.GetFloat("TimeScale", 1); SR = GameObject.FindObjectOfType(typeof(ScreenRecording)) as ScreenRecording; }
static async Task InvokeAfterCaptureAction(ScreenRecording recording, HSSettings settingsContext) { switch (settingsContext.ActionAfterVideoCapture) { case VideoCaptureHandlingAction.Upload: try { var payload = new VideoUploadPayload(recording); var result = await UploadDispatcher.InitiateUploadToDefaultUploader(payload, settingsContext, HolzShotsApplication.Instance.Uploaders, null).ConfigureAwait(true); UploadHelper.InvokeUploadFinishedUI(result, settingsContext); } catch (UploadCanceledException) { NotificationManager.ShowOperationCanceled(); } catch (UploadException ex) { await NotificationManager.UploadFailed(ex); } return; case VideoCaptureHandlingAction.CopyFile: { var success = ClipboardEx.SetFiles(recording.FilePath); if (settingsContext.ShowCopyConfirmation) { if (success) { NotificationManager.ShowFileCopyConfirmation(); } else { NotificationManager.CopyingFileFailed(); } } } break; case VideoCaptureHandlingAction.CopyFilePath: { var success = ClipboardEx.SetText(recording.FilePath); if (settingsContext.ShowCopyConfirmation) { if (success) { NotificationManager.ShowFilePathCopyConfirmation(); } else { NotificationManager.CopyingFilePathFailed(); } } } break; case VideoCaptureHandlingAction.ShowInExplorer: IO.HolzShotsPaths.OpenSelectedFileInExplorer(recording.FilePath); return; case VideoCaptureHandlingAction.OpenInDefaultApp: Process.Start(recording.FilePath); return; case VideoCaptureHandlingAction.None: return; default: throw new ArgumentException("Unhandled VideoCaptureHandlingAction: " + settingsContext.ActionAfterVideoCapture); } }