[UsedImplicitly] private void OnDisable()
        {
            if (_started)
            {
                _capture.Pause();
            }

#if UNITY_EDITOR
            UnityEditor.EditorApplication.pauseStateChanged -= OnEditorPauseChanged;
#endif
        }
Beispiel #2
0
 private void OnEditorPauseChanged(UnityEditor.PauseState state)
 {
     if (state == UnityEditor.PauseState.Paused)
     {
         _capture.Pause();
     }
     else if (state == UnityEditor.PauseState.Unpaused)
     {
         _capture.Resume();
     }
 }
Beispiel #3
0
        private void OnEditorPlaymodeChanged()
        {
#if UNITY_EDITOR
            if (UnityEditor.EditorApplication.isPaused)
            {
                _capture.Pause();
            }
            else if (UnityEditor.EditorApplication.isPlaying)
            {
                _capture.Resume();
            }
#endif
        }