コード例 #1
0
 public static void HideEditor()
 {
     if (f != null)
     {
         f = (GridWindow)EditorWindow.GetWindow(typeof(GridWindow), false, "GridEditor2D");
         f.Close();
         DestroyImmediate(f);
         f = (GridWindow)ScriptableObject.CreateInstance(typeof(GridWindow));
         f.Init();
     }
 }
コード例 #2
0
 public static void ShowEditor()
 {
     if (f == null)
     {
         f = (GridWindow)EditorWindow.GetWindow(typeof(GridWindow), false, "GridEditor2D");
         f.Show();
         f.minSize = new Vector2(220f, 400f);
         f.Init();
     }
     else
     {
         if (f.grid)
         {
             if (!f.grid.DrawEditorInSceneGUI)
             {
                 f.Show();
             }
         }
     }
 }