public static void Init() { // this function will be called by the isaac menu tool. It will initialize and show this popup window. TilePopupWindow window = ScriptableObject.CreateInstance <TilePopupWindow>(); // 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. }
public static void CreateTile() { TilePopupWindow.Init(); // call on our popup window. }