private void EditorApplication_playModeStateChanged(UnityEditor.PlayModeStateChange state)
 {
     if (state == UnityEditor.PlayModeStateChange.EnteredEditMode)
     {
         spawn = null;
     }
 }
Exemple #2
0
 static void AbortOnPlaymodeChange(UnityEditor.PlayModeStateChange state)
 {
     if (state == UnityEditor.PlayModeStateChange.ExitingEditMode || state == UnityEditor.PlayModeStateChange.ExitingPlayMode)
     {
         Abort();
     }
 }
Exemple #3
0
 private static void RaiseOnQuit(UnityEditor.PlayModeStateChange playModeChange)
 {
     if (playModeChange == UnityEditor.PlayModeStateChange.ExitingPlayMode)
     {
         RaiseOnQuit();
     }
 }
Exemple #4
0
    private void EditorApplication_playModeStateChanged(UnityEditor.PlayModeStateChange obj)
    {
        switch (obj)
        {
        case UnityEditor.PlayModeStateChange.EnteredEditMode:
            break;

        case UnityEditor.PlayModeStateChange.ExitingEditMode:
            break;

        case UnityEditor.PlayModeStateChange.EnteredPlayMode:
            int _saveSlot = saveSlot;
            saveSlot = -1;
            Save();
            saveSlot = _saveSlot;
            break;

        case UnityEditor.PlayModeStateChange.ExitingPlayMode:
            int _saveSlot2 = saveSlot;
            saveSlot = -1;
            Load();
            saveSlot = _saveSlot2;
            break;
        }
    }
Exemple #5
0
 private void EditorApplication_playModeStateChanged(UnityEditor.PlayModeStateChange state)
 {
     if (state == UnityEditor.PlayModeStateChange.EnteredEditMode)
     {
         QuestState = QuestState.UNASSIGNED;
     }
 }
Exemple #6
0
 private void EditorApplication_playModeStateChanged(UnityEditor.PlayModeStateChange state)
 {
     if (state == UnityEditor.PlayModeStateChange.EnteredEditMode)
     {
         topicIndex = 0;
     }
 }
 private void EditorApplication_playModeStateChanged(UnityEditor.PlayModeStateChange state)
 {
     if (state == UnityEditor.PlayModeStateChange.ExitingPlayMode)
     {
         Reset();
     }
 }
Exemple #8
0
 private void WebSocketCloseOnEditor(UnityEditor.PlayModeStateChange state)
 {
     if (UnityEditor.PlayModeStateChange.ExitingPlayMode == state)
     {
         Close();
     }
 }
 private void OnPlayModeStateChange(UnityEditor.PlayModeStateChange state)
 {
     if (state == UnityEditor.PlayModeStateChange.ExitingEditMode || state == UnityEditor.PlayModeStateChange.ExitingPlayMode)
     {
         Clear();
     }
 }
Exemple #10
0
 private void SaveExpansionStatusBeforePlay(UnityEditor.PlayModeStateChange playMode)
 {
     if (playMode == UnityEditor.PlayModeStateChange.ExitingEditMode)
     {
         SaveExpansionStatus();
     }
 }
Exemple #11
0
 private void Changed(UnityEditor.PlayModeStateChange state)
 {
     if (state == UnityEditor.PlayModeStateChange.ExitingPlayMode)
     {
         skip = true;
     }
 }
Exemple #12
0
 protected void PlayModeStateChanged(UnityEditor.PlayModeStateChange state)
 {
     if (state == UnityEditor.PlayModeStateChange.ExitingPlayMode)
     {
         this.StopThread(true);
     }
 }
 static void OnPlayStateChanged(UnityEditor.PlayModeStateChange state)
 {
     if (state == UnityEditor.PlayModeStateChange.ExitingPlayMode)
     {
         Quitting();
     }
 }
 private void EditorApplication_playModeStateChanged(UnityEditor.PlayModeStateChange state)
 {
     if (state == UnityEditor.PlayModeStateChange.EnteredEditMode || state == UnityEditor.PlayModeStateChange.EnteredPlayMode)
     {
         BehaivorsClones.Clear();
     }
 }
Exemple #15
0
 private void EditorApplication_playModeStateChanged(UnityEditor.PlayModeStateChange change)
 {
     if (change == UnityEditor.PlayModeStateChange.ExitingPlayMode)
     {
         OnDestroy();
     }
 }
 private static void OnPlaymodeStateChanged(UnityEditor.PlayModeStateChange change)
 {
     // Reset main thread id if exiting from play mode in Editor.
     if (!UnityEditor.EditorApplication.isPlaying)
     {
         mainThreadId = null;
     }
 }
Exemple #17
0
 private void OnEditorPlayModeChanged(UnityEditor.PlayModeStateChange stateChnage)
 {
     if (UnityEngine.Application.isPlaying == false)
     {
         UnityEditor.EditorApplication.playModeStateChanged -= OnEditorPlayModeChanged;
         Dispose();
     }
 }
Exemple #18
0
 private void HandleEditorPlayModeStateChanged(UnityEditor.PlayModeStateChange state)
 {
     if (state == UnityEditor.PlayModeStateChange.ExitingPlayMode && !quitting)
     {
         OnUnityApplicationWantsToQuit();
         UnityEditor.EditorApplication.isPlaying = true;
     }
 }
 private void OnPlayStateChanged(UnityEditor.PlayModeStateChange stateChange)
 {
     if (_floatValue != null && _floatValue is ISOWatchable)
     {
         ISOWatchable watchableFloatValue = _floatValue as ISOWatchable;
         watchableFloatValue.onSOChanged -= OnValueChanged;
     }
 }
 private void OnPlayModeStateChanged(UnityEditor.PlayModeStateChange playMode)
 {
     if (playMode == UnityEditor.PlayModeStateChange.ExitingPlayMode)
     {
         // hack to avoid 'Can't destroy Transform component' error due to parent hide flags.
         transform.parent = null;
     }
 }
Exemple #21
0
 private static void PlayModeChanged(UnityEditor.PlayModeStateChange mode)
 {
     if (mode == UnityEditor.PlayModeStateChange.EnteredEditMode)
     {
         AkWwiseProjectInfo.Populate();
         AkWwiseFileWatcher.Instance.StartWatchers();
     }
 }
 void OnPlayModeChanged(UnityEditor.PlayModeStateChange state)
 {
     // Stop running in edit mode when entering play mode.
     if (state == UnityEditor.PlayModeStateChange.ExitingEditMode)
     {
         runInEditMode = false;
         OnDisable();
     }
 }
    private void HandleOnPlayModeChanged(UnityEditor.PlayModeStateChange state) //FIX FOR UNITY POST 2017
    {
        // This method is run whenever the playmode state is changed.


        paused = UnityEditor.EditorApplication.isPaused;
        //print ("editor paused "+paused);
        // do stuff when the editor is paused.
    }
        private void PlayModeStateChanged(UnityEditor.PlayModeStateChange stateChange)
        {
            if (stateChange != UnityEditor.PlayModeStateChange.EnteredEditMode)
            {
                return;
            }

            RestoreSettings();
        }
Exemple #25
0
        static void PlayModeChanged
        (
#if UNITY_2017_2_OR_NEWER
            UnityEditor.PlayModeStateChange state
#endif
        )
        {
            applicationPlaying = Application.isPlaying && UnityEditor.EditorApplication.isPlayingOrWillChangePlaymode;
        }
Exemple #26
0
 /// <summary>
 /// Invoked when the Unity Editor has a <see cref="UnityEditor.PlayModeStateChange"/> change.
 /// </summary>
 private static void OnPlayModeStateChanged(UnityEditor.PlayModeStateChange playModeStateChange)
 {
     // When entering edit-mode, reset all static state so that it does not interfere with the
     // next play-mode session.
     if (playModeStateChange == UnityEditor.PlayModeStateChange.EnteredEditMode)
     {
         _sharedInstance = null;
     }
 }
Exemple #27
0
 private void OnEditorPalyModeChanged(UnityEditor.PlayModeStateChange state)
 {
     //点击编辑器停止的时候调用
     if (state == UnityEditor.PlayModeStateChange.ExitingPlayMode)
     {
         UnityEditor.EditorApplication.playModeStateChanged -= OnEditorPalyModeChanged;
         Exit();
     }
 }
        static void PlaymodeStateChanged(UnityEditor.PlayModeStateChange state)
#endif
        {
            if (DOTween.instance == null)
            {
                return;
            }
            DOTween.instance.OnApplicationPause(UnityEditor.EditorApplication.isPaused);
        }
 static void OnPlayMode(UnityEditor.PlayModeStateChange change)
 {
     if (change == UnityEditor.PlayModeStateChange.ExitingEditMode)
     {
         s_HUDTabs.Clear();
         s_HeaderContents.Clear();
         s_ActiveWindows.Clear();
     }
 }
 private void EditorApplication_playModeStateChanged(UnityEditor.PlayModeStateChange state)
 {
     if (state == UnityEditor.PlayModeStateChange.EnteredEditMode || state == UnityEditor.PlayModeStateChange.EnteredPlayMode)
     {
         runtimeBaseValue = baseValue;
         Value            = baseValue;
         Modifiers.Clear();
     }
 }