private void OnGUI() { if (GUILayout.Button("Spells")) { SpellCreator spellWindow = (SpellCreator)CreateInstance(typeof(SpellCreator)); spellWindow.Show(); } if (GUILayout.Button("Weapons")) { WeaponCreator weaponWindow = (WeaponCreator)CreateInstance(typeof(WeaponCreator)); weaponWindow.Show(); } }
static void Init() { SpellCreator spellWindow = (SpellCreator)EditorWindow.CreateInstance(typeof(SpellCreator)); spellWindow.Show(); }