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