public void OnDestroy()
        {
            Window = null;
            wingWindows.Clear(); // window canvas gets deleted on scene load so the windows this is holding cant actually be used...

            StaticWingGlobals.SaveConfigs();
        }
        public static EditorWindow GetWindow(Base_ProceduralWing forWing)
        {
            if (Window != null)
                Window.closeWindow();

            if (!wingWindows.TryGetValue(forWing.ClassID, out Window))
            {
                Window = forWing.CreateWindow();
                wingWindows.Add(forWing.ClassID, Window);
            }

            return Window;
        }
Esempio n. 3
0
 public static EditorWindow GetWindow(Base_ProceduralWing forWing)
 {
     if (Window != null)
         Window.closeWindow();
     if (!wingWindows.TryGetValue(forWing.ClassID, out Window))
     {
         Window = forWing.CreateMainWindow();
         Window.wing = forWing;
         forWing.AddMatchingButtons(Window);
         if (forWing.CanBeFueled)
         {
             Window.AddFuelPanel();
         }
         wingWindows.Add(forWing.ClassID, Window);
     }
     Window.wing = forWing;
     return Window;
 }