Exemple #1
0
 public static void CloseDialog()
 {
     if (s_window != null)
     {
         try
         {
             s_window.Close();
         }
         catch (Exception ex)
         {
             Debug.LogError("Close Exception : " + ex);
         }
         s_window = null;
     }
 }
Exemple #2
0
        public static void ShowDialog(apEditor editor)
        {
            CloseDialog();



            EditorWindow       curWindow = EditorWindow.GetWindow(typeof(apDialog_UpdateLog), true, "Update Log", true);
            apDialog_UpdateLog curTool   = curWindow as apDialog_UpdateLog;

            //object loadKey = new object();
            if (curTool != null && curTool != s_window)
            {
                int width  = 800;
                int height = 700;
                s_window = curTool;
                if (editor != null)
                {
                    s_window.position = new Rect((editor.position.xMin + editor.position.xMax) / 2 - (width / 2),
                                                 (editor.position.yMin + editor.position.yMax) / 2 - (height / 2),
                                                 width, height);
                }
                s_window.Init();
            }
        }