예제 #1
0
        public virtual void CreateEditors()
        {
            editors.Clear();
            itemEditor = new EmptyEditor("Items editor", this);
            itemEditor.requiresDatabase = true;

#if UNITY_2018_3_OR_NEWER
            previewScene = UnityEditor.SceneManagement.EditorSceneManager.NewPreviewScene();
            itemEditor.childEditors.Add(new ItemEditor("Item", "Items", this, previewScene));
#else
            itemEditor.childEditors.Add(new ItemEditor("Item", "Items", this));
#endif


            itemEditor.childEditors.Add(new ItemCategoryEditor("Item category", "Item categories", this)
            {
                canReOrderItems = true
            });
            itemEditor.childEditors.Add(new ItemStatEditor("Item stat", "Item stats", this)
            {
                canReOrderItems = true
            });
            itemEditor.childEditors.Add(new ItemRarityEditor("Item Rarity", "Item rarities", this)
            {
                canReOrderItems = true
            });
            editors.Add(itemEditor);

            var currencyEditor = new CurrencyEditor("Currency", "Currencies", this);
            currencyEditor.requiresDatabase = true;
            currencyEditor.canReOrderItems  = true;
            editors.Add(currencyEditor);

            equipEditor = new EmptyEditor("Equipment editor", this);
            equipEditor.requiresDatabase = true;
#if PLY_GAME
            equipEditor.childEditors.Add(new plyStatsEditor("Ply stats", this));
#endif
            equipEditor.childEditors.Add(new EquipmentTypeEditor("EquippedItem type", "EquippedItem types", this)
            {
                canReOrderItems = true
            });
            editors.Add(equipEditor);

            craftingEditor = new CraftingEmptyEditor("Crafting editor", this);
            craftingEditor.requiresDatabase = true;
            editors.Add(craftingEditor);

            languageEditor = new LanguageEditor("Language", "Language categories", this);
            editors.Add(languageEditor);

            settingsEditor = new SettingsEditor("Settings", "Settings categories", this);
            editors.Add(settingsEditor);
        }
예제 #2
0
 public CraftingCategoryEditor(string singleName, string pluralName, EditorWindow window, CraftingEmptyEditor editor) : base(singleName, pluralName, window)
 {
     parentEditor    = editor;
     canReOrderItems = true;
 }