Last active
January 2, 2020 16:59
-
-
Save SeppahBaws/6a67ae426a01d5ac76891c33b6edab8e to your computer and use it in GitHub Desktop.
Revisions
-
SeppahBaws revised this gist
Jan 2, 2020 . 1 changed file with 1 addition and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,4 @@ // === EditorStateVisualizer By Seppe Dekeyser. === using UnityEngine; using UnityEditor; -
SeppahBaws created this gist
Dec 22, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,50 @@ // ================================================ // // EditorStateVisualizer By Seppe Dekeyser. // // ================================================ using UnityEngine; using UnityEditor; enum EditorState { Ready, Compiling, Paused, Playing, Updating } public class EditorStateVisualizer : EditorWindow { private EditorState state; [MenuItem("Custom Utils/General/Editor State")] static void Init() { EditorWindow window = EditorWindow.GetWindowWithRect(typeof(EditorStateVisualizer), new Rect(0, 0, 200, 30)); window.Show(); } void OnGUI() { if (EditorApplication.isCompiling) state = EditorState.Compiling; else if (EditorApplication.isPaused) state = EditorState.Paused; else if (EditorApplication.isPlaying) state = EditorState.Playing; else if (EditorApplication.isUpdating) state = EditorState.Updating; else state = EditorState.Ready; EditorGUILayout.LabelField("Editor state:", state.ToString()); this.Repaint(); } }