Пример #1
0
 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();
     }
 }
Пример #2
0
    static void Init()
    {
        SpellCreator spellWindow = (SpellCreator)EditorWindow.CreateInstance(typeof(SpellCreator));

        spellWindow.Show();
    }