public static void Init()
    {
        // this function will be called by the isaac menu tool. It will initialize and show this popup window.

        UnitPopupWindow window = ScriptableObject.CreateInstance <UnitPopupWindow>(); // create a new instance of this class

        window.position = new Rect(Screen.width / 2, Screen.height / 2, 256, 256);    // set the position of the window when it opens
        window.ShowPopup();                                                           // called EditorWindow.ShowPopup() to open the window in the editor.
    }
Example #2
0
 public static void CreateUnit()
 {
     UnitPopupWindow.Init();
 }