Пример #1
0
 public static void CodeReload()
 {
     //detects if the window is alread opened and grabs it.
     //Code recompiles causes the instance reference to be lost.
     if (EditorWindow.HasOpenInstances <EnemyEntityEditor>())
     {
         instance = EditorWindow.GetWindow <EnemyEntityEditor>("", false);
         instance.UpdateSlection();
     }
 }
Пример #2
0
 public static void MenuCreateWindow()
 {
     if (instance == null)
     {
         instance = CreateWindow <EnemyEntityEditor>();
     }
     else
     {
         EditorWindow.FocusWindowIfItsOpen <EnemyEntityEditor>();
     }
     instance.UpdateSlection();
 }