예제 #1
0
 private void OnEditorPauseChanged(UnityEditor.PauseState state)
 {
     if (state == UnityEditor.PauseState.Paused)
     {
         _capture.Pause();
     }
     else if (state == UnityEditor.PauseState.Unpaused)
     {
         _capture.Resume();
     }
 }
예제 #2
0
        [UsedImplicitly] private void OnEnable()
        {
            if (_started)
            {
                _capture.Resume("DissonanceComms OnEnable called");
            }

#if UNITY_EDITOR
            UnityEditor.EditorApplication.pauseStateChanged += OnEditorPauseChanged;
#endif
        }
예제 #3
0
        private void OnEditorPlaymodeChanged()
        {
#if UNITY_EDITOR
            if (UnityEditor.EditorApplication.isPaused)
            {
                _capture.Pause();
            }
            else if (UnityEditor.EditorApplication.isPlaying)
            {
                _capture.Resume();
            }
#endif
        }