[UsedImplicitly] private void OnDisable() { if (_started) { _capture.Pause(); } #if UNITY_EDITOR UnityEditor.EditorApplication.pauseStateChanged -= OnEditorPauseChanged; #endif }
private void OnEditorPauseChanged(UnityEditor.PauseState state) { if (state == UnityEditor.PauseState.Paused) { _capture.Pause(); } else if (state == UnityEditor.PauseState.Unpaused) { _capture.Resume(); } }
private void OnEditorPlaymodeChanged() { #if UNITY_EDITOR if (UnityEditor.EditorApplication.isPaused) { _capture.Pause(); } else if (UnityEditor.EditorApplication.isPlaying) { _capture.Resume(); } #endif }