protected override OdinMenuTree BuildMenuTree() { OdinMenuTree tree = new OdinMenuTree(supportsMultiSelect: false); tree.Config.DrawSearchToolbar = true; foreach (var item in ActionHomeConfig.MenuItems) { if (item.Key != GroupType.None) { tree.Add(item.Value, null, EditorIcons.Table); } else { tree.Add("主页", HomeConfig.Instance, EditorIcons.House); } } foreach (var group in HomeConfig.Instance.ModelGroupDict) { foreach (var item in group.Value) { tree.Add(item.MenuItemName, item); } } tree.Selection.SelectionChanged += OnMenuItemChange; return(tree); }
protected override OdinMenuTree BuildMenuTree() { var tree = new OdinMenuTree(); tree.Selection.SupportsMultiSelect = false; tree.Add("Settings", GeneralDrawerConfig.Instance); tree.Add("Utilities", new TextureUtilityEditor()); tree.Add("Utilities/MyStruct", new MyStruct()); tree.AddAllAssetsAtPath("Odin Settings", "", typeof(ScriptableObject), true, true); return(tree); var tree2 = new OdinMenuTree(); tree2.DefaultMenuStyle = OdinMenuStyle.TreeViewStyle; tree2.Add("Menu Style", tree2.DefaultMenuStyle); var allAssets = AssetDatabase.GetAllAssetPaths() .Where(x => x.StartsWith("Assets/")) .OrderBy(x => x); foreach (var path in allAssets) { tree2.AddAssetAtPath(path.Substring("Assets/".Length), path); } tree2.EnumerateTree().AddThumbnailIcons(); return(tree2); }
/// <summary> /// Set the tree element /// </summary> public void setTreeElements() { tree.Add("Characters", _characterDatabase); tree.Add("Enemy", _enemyDatabase); tree.Add("Items", _itemDatabase); tree.Add("Actions", _actionDatabase); }
protected override OdinMenuTree BuildMenuTree() { var tree = new OdinMenuTree(); tree.DefaultMenuStyle = OdinMenuStyle.TreeViewStyle; // tree.Add("Menu Style", tree.DefaultMenuStyle); tree.Selection.SupportsMultiSelect = false; tree.Add("AB管理", new ABManager()); tree.Add("DLL管理", new DLLManager()); tree.Add("Manifest", AssetDatabase.LoadAssetAtPath <UnityEngine.Object>("Assets/Manifest.asset")); tree.Add("配置", Resources.Load <LWGlobalConfig>("LWGlobalConfig")); tree.Add("其他", new OtherToolManger()); tree.AddAllAssetsAtPath("序列化文件", "Assets/LWFramework/Editor", typeof(ScriptableObject), true, true); //var allAssets = AssetDatabase.GetAllAssetPaths() // .Where(x => x.StartsWith("Assets/")) // .OrderBy(x => x); //foreach (var path in allAssets) //{ // tree.AddAssetAtPath(path.Substring("Assets/".Length), path); //} tree.EnumerateTree().AddThumbnailIcons(); return(tree); }
protected override OdinMenuTree BuildMenuTree() { OdinMenuTree tree = new OdinMenuTree(false); tree.Config.DrawSearchToolbar = true; tree.Selection.SelectionChanged += OnSelectionChanged; tree.Config.DefaultMenuStyle.Height = 22; tree.Config.DefaultMenuStyle.Borders = true; if (domains.IsEmpty()) { Domain defaultDomain = new Domain() { name = "Default", features = new List <Feature>() }; domains.Add(defaultDomain); tree.Add(defaultDomain.name, defaultDomain); } foreach (Domain domain in domains) { tree.Add(domain.name, domain); foreach (Feature feature in domain.features) { tree.Add($"{domain.name}/{feature.name}", feature); foreach (Component component in feature.components) { tree.Add($"{domain.name}/{feature.name}/{component.name}", component); } } } return(tree); }
private SomeData someData = new SomeData(); // Take a look at SomeData.cs to see how serialization works in Editor Windows. protected override OdinMenuTree BuildMenuTree() { OdinMenuTree tree = new OdinMenuTree(supportsMultiSelect: true) { { "Home", this, EditorIcons.House }, // Draws the this.someData field in this case. { "Odin Settings", null, EditorIcons.SettingsCog }, { "Odin Settings/Color Palettes", ColorPaletteManager.Instance, EditorIcons.EyeDropper }, { "Odin Settings/AOT Generation", AOTGenerationConfig.Instance, EditorIcons.SmartPhone }, { "Player Settings", Resources.FindObjectsOfTypeAll <PlayerSettings>().FirstOrDefault() }, { "Some Class", this.someData } }; tree.AddAllAssetsAtPath("Odin Settings/More Odin Settings", "Plugins/Sirenix", typeof(ScriptableObject), true) .AddThumbnailIcons(); tree.AddAssetAtPath("Odin Getting Started", "Plugins/Sirenix/Getting Started With Odin.asset"); tree.MenuItems.Insert(2, new OdinMenuItem(tree, "Menu Style", tree.DefaultMenuStyle)); tree.Add("Menu/Items/Are/Created/As/Needed", new GUIContent()); tree.Add("Menu/Items/Are/Created", new GUIContent("And can be overridden")); tree.SortMenuItemsByName(); // As you can see, Odin provides a few ways to quickly add editors / objects to your menu tree. // The API also gives you full control over the selection, etc.. // Make sure to check out the API Documentation for OdinMenuEditorWindow, OdinMenuTree and OdinMenuItem for more information on what you can do! return(tree); }
protected override OdinMenuTree BuildMenuTree() { OdinMenuTree tree = new OdinMenuTree(true); tree.DefaultMenuStyle = OdinMenuStyle.TreeViewStyle; tree.Config.DrawSearchToolbar = true; //tree.Add("Menu Style", tree.DefaultMenuStyle, EditorIcons.SettingsCog); tree.Add("Game Master", GameMaster.Get(), EditorIcons.PacmanGhost); tree.AddAllAssetsAtPath("Data", "Assets/Data", typeof(IntValue), true).AddThumbnailIcons(); tree.AddAllAssetsAtPath("Data", "Assets/Data", typeof(FloatValue), true).AddThumbnailIcons(); tree.AddAllAssetsAtPath("Data", "Assets/Data", typeof(HeartsValue), true).AddThumbnailIcons(); tree.AddAllAssetsAtPath("Data", "Assets/Data", typeof(DynamicsProfile), true).AddThumbnailIcons(); tree.Add("Audio", null, EditorIcons.Sound); tree.AddAllAssetsAtPath("Audio", "Assets/Audio/Audio Collections", typeof(AudioCollection), true).AddThumbnailIcons(); tree.Add("Save Data", null, EditorIcons.GridBlocks); BuildSaveDataTree <string>(tree, "StringValue"); BuildSaveDataTree <int>(tree, "IntValue"); BuildSaveDataTree <float>(tree, "FloatValue"); BuildSaveDataTree <bool>(tree, "BoolValue"); BuildSaveDataTree <Hearts>(tree, "HeartsValue"); BuildSaveDataTree <bool>(tree, "ConstellationData"); return(tree); }
/// <summary> /// Method that created a tree for editor window that is just a list. /// </summary> /// <returns>returns a OdingMneuTree that is created in this window</returns> protected override OdinMenuTree BuildMenuTree() { OdinMenuTree tree = new OdinMenuTree(true); tree.DefaultMenuStyle.IconSize = 28.00f; tree.Config.DrawSearchToolbar = true; tree.DefaultMenuStyle = OdinMenuStyle.TreeViewStyle; OdinMenuStyle style = new OdinMenuStyle() { Height = 23, Offset = 20.00f, IndentAmount = 15.00f, IconSize = 16.00f, IconOffset = 0.00f, NotSelectedIconAlpha = 0.85f, IconPadding = 0.1f, TriangleSize = 16.00f, TrianglePadding = 0.00f, AlignTriangleLeft = true, Borders = true, BorderPadding = 0.00f, BorderAlpha = 0.32f, SelectedColorDarkSkin = new Color(0.736f, 0.101f, 0.038f, 1.000f), SelectedColorLightSkin = new Color(0.736f, 0.101f, 0.038f, 1.000f) }; tree.DefaultMenuStyle = style; tree.Add("Android Parameters", new AndroidParameter()); tree.Add("iOS Parameters", new IOSParameter()); tree.Add("Windows Parameters", new WindowsParameter()); return(tree); }
protected override OdinMenuTree BuildMenuTree() { _googleSheetImporter = GetGoogleSpreadsheetImporter(); _menuTree = new OdinMenuTree(); var spreadSheerHandler = _googleSheetImporter.sheetsItemsHandler; _assetsHandlers = spreadSheerHandler.Importers.ToList(); _operations = new GoogleImportersCommonOperations(_googleSheetImporter); _menuTree.Add("Commands", _operations); foreach (var importer in _assetsHandlers) { _menuTree.Add($"Import & Export/{importer.Name}", importer); } _menuTree.Add("Configuration", _googleSheetImporter); if (_googleSheetImporter.autoConnect) { _operations.Reconnect(); } OnStartElements(); return(_menuTree); }
protected override OdinMenuTree BuildMenuTree() { var tree = new OdinMenuTree(supportsMultiSelect: false); tree.Add("Setting", new NoiseSetting()); creators.ForEach((c) => { tree.Add(c.name, c); }); return(tree); }
protected override OdinMenuTree BuildMenuTree() { OdinMenuTree tree = new OdinMenuTree(); tree.Config.DrawSearchToolbar = true; tree.Add("Sprite Packing Tag 管理", new SpritePackingTagOptimizesModule(this)); tree.Add("查找项目无用资源", new UselessAssetsOptimizesModule(this)); return(tree); }
protected override OdinMenuTree BuildMenuTree() { OdinMenuTree tree = new OdinMenuTree(); tree.Config.DrawSearchToolbar = true; tree.Add("热更资源", new BuildResModule(this)); tree.Add("setting.json", new BuildSettingJsonModule(this)); return(tree); }
protected override OdinMenuTree BuildMenuTree() { OdinMenuTree tree = new OdinMenuTree(); tree.Add("Heightmap Editor", new TerrainHeightmapEditor()); tree.Add("Texture Editor", new TerrainTextureEditor()); tree.Add("Shading Editor", new TerrainShadingEditor()); return(tree); }
protected override OdinMenuTree BuildMenuTree() { OdinMenuTree tree = new OdinMenuTree(); tree.Config.DrawSearchToolbar = true; tree.Add("Assets资源名生成", new GenerateAssetBundleNameModule(this)); tree.Add("link.xml", new GenerateLinkXMLModule(this)); tree.Add("ILRuntime CLR Binding Codes", new GenerateILRuntimeCLRBindingModule(this)); return(tree); }
protected override OdinMenuTree BuildMenuTree() { m_tree = new OdinMenuTree(); m_tree.Selection.SelectionChanged += OnSelectedChanged; m_tree.Selection.SupportsMultiSelect = false; m_tree.Add("预计算", m_pre_compute_component); m_tree.Add("实时计算的相关设置", m_realtime_compute_component); //TrySelectMenuItemWithObject(m_pre_compute_component); return(m_tree); }
protected override OdinMenuTree BuildMenuTree() { var tree = new OdinMenuTree(true); tree.Selection.SupportsMultiSelect = false; tree.Add("GeneralWindowCode", new GeneralWindowCode()); tree.Add("Others", new OthersWindow()); return(tree); }
protected override OdinMenuTree BuildMenuTree() { var tree = new OdinMenuTree(); tree.Add("Entities", entityEditor); tree.Add("Actions", actionEditor); tree.Add("Goals", goalEditor); tree.Add("Norms", normEditor); return(tree); }
protected override OdinMenuTree BuildMenuTree() { var tree = new OdinMenuTree(); tree.Selection.SupportsMultiSelect = false; tree.Add("Settings", GeneralDrawerConfig.Instance); tree.Add("Utilities", new TextureUtilityEditor()); tree.AddAllAssetsAtPath("Odin Settings", "Assets/Plugins/Sirenix", typeof(ScriptableObject), true, true); return(tree); }
protected override OdinMenuTree BuildMenuTree() { var tree = new OdinMenuTree(); // tree.Add("Communities", ) tree.Add("Agents", agentEditor); tree.Add("Vessels", vesselEditor); tree.Add("Communities", communityEditor); tree.Add("Test", new TestMenu()); return(tree); }
protected override OdinMenuTree BuildMenuTree() { var tree = new OdinMenuTree(); tree.Selection.SupportsMultiSelect = false; tree.Add("Create New", new CreateNewCharcacterData()); tree.AddAllAssetsAtPath("Enemy Data", "Assets/Scripts/2D Character Creator/Characters", typeof(CharacterSpriteData)); if (sprites != null) { tree.Add("Set Up Sprites", sprites); } return(tree); }
protected override OdinMenuTree BuildMenuTree() { var tree = new OdinMenuTree(true); tree.DefaultMenuStyle.IconSize = 28.00f; tree.Config.DrawSearchToolbar = true; // Adds the character overview table. CharacterOverview.Instance.UpdateCharacterOverview(); tree.Add("Characters", new CharacterTable(CharacterOverview.Instance.AllCharacters)); // Adds all cahracters. tree.AddAllAssetsAtPath("Characters", "Assets/Plugins/Sirenix", typeof(Character), true, true); // Add all scriptable object items. tree.AddAllAssetsAtPath("", "Assets/Plugins/Sirenix/Demos/SAMPLE - RPG Editor/Items", typeof(Item), true) .ForEach(this.AddDragHandles); // Add drag handles to items, so they can be easily dragged into the inventory if characters etc... tree.EnumerateTree().Where(x => x.Value as Item).ForEach(AddDragHandles); // Add icons to characters and items. tree.EnumerateTree().AddIcons <Character>(x => x.Icon); tree.EnumerateTree().AddIcons <Item>(x => x.Icon); return(tree); }
protected override OdinMenuTree BuildMenuTree() { var tree = new OdinMenuTree(true); tree.DefaultMenuStyle.IconSize = 28.00f; //图标大小 tree.Config.DrawSearchToolbar = true; //搜索栏 //角色预览页 MonsterOverview.Instance.UpdataMonsterOverview(); tree.Add("Monsters", new MonsterTable(MonsterOverview.Instance.AllMonsters)); //增加所有角色到左边 tree.AddAllAssetsAtPath("Resources/ScriptsObject/MonsterSet", "Assets", typeof(MonsterSet), true, true); //添加所有的模块到左边 tree.AddAllAssetsAtPath("Resources/ScriptsObject/ModuleSet", "Assets", typeof(ModuleSet), true, true); //拖拽功能 tree.EnumerateTree().Where(x => x.Value as ModuleSet).ForEach(AddDragHandles); //添加所有的技能到左边 tree.AddAllAssetsAtPath("Resources/ScriptsObject/SkillSet", "Assets", typeof(SkillSet), true, true); //拖拽功能 tree.EnumerateTree().Where(x => x.Value as SkillSet).ForEach(AddDragHandles); //添加图标 tree.EnumerateTree().AddIcons <MonsterSet>(x => x.monsterIcon); tree.EnumerateTree().AddIcons <ModuleSet>(x => x.moduleIconA); tree.EnumerateTree().AddIcons <SkillSet>(x => x.skillIconA); return(tree); }
protected override OdinMenuTree BuildMenuTree() { OdinMenuTree tree = new OdinMenuTree(); tree.Config.DrawSearchToolbar = true; tree.Add("iOS项目配置", new IOSProjectInitModule(this)); return(tree); }
protected override OdinMenuTree BuildMenuTree() { var tree = new OdinMenuTree(false); tree.DefaultMenuStyle.IconSize = 28.00f; tree.Config.DrawSearchToolbar = true; tree.Add("NPCS", null); tree.Add("NPCS/None", null); //If you decide to use the DialogueEditorSettings, you can use it as such, after you Create one //tree.AddAllAssetsAtPath("NPCS",DialogueEditorSettings.instance.NPCPath,typeof(NPCDialogue),true); try { //Try to avoid null ref exception tree.AddAllAssetsAtPath("NPCS", "", typeof(NPCDialogue), true); tree.EnumerateTree().AddIcons <NPCDialogue>(x => x.icon); } catch { } return(tree); }
protected override OdinMenuTree BuildMenuTree() { OdinMenuTree tree = new OdinMenuTree(); tree.Config.DrawSearchToolbar = false; tree.Add("同步协议", new SyncProtosEditorModule(this)); return(tree); }
protected override OdinMenuTree BuildMenuTree() { OdinMenuTree tree = new OdinMenuTree(); tree.Config.DrawSearchToolbar = true; tree.Add("AssetBundleName.cs", new GenerateAssetBundleNameModule()); return(tree); }
protected override OdinMenuTree BuildMenuTree() { CardLibraryInfo cardLibraryInfo = CardLibraryCommand.GetLibraryInfo(); var tree = new OdinMenuTree(true); tree.DefaultMenuStyle.Height = 60; tree.DefaultMenuStyle.IconSize = 48.00f; tree.Config.DrawSearchToolbar = true; CardLibraryCommand.Init(); tree.Add("单人模式牌库", cardLibraryInfo); foreach (var levelLibrary in cardLibraryInfo.levelLibries.Where(library => library.isSingleMode)) { tree.Add($"单人模式牌库/{levelLibrary.level}", levelLibrary); foreach (var sectarianCardLibrary in levelLibrary.sectarianCardLibraries) { tree.Add($"单人模式牌库/{levelLibrary.level}/{sectarianCardLibrary.sectarian}", sectarianCardLibrary); foreach (var rankLibrary in sectarianCardLibrary.rankLibraries) { tree.Add($"单人模式牌库/{levelLibrary.level}/{sectarianCardLibrary.sectarian}/{rankLibrary.rank}", rankLibrary); foreach (var cardModel in rankLibrary.cardModelInfos) { tree.Add($"单人模式牌库/{levelLibrary.level}/{sectarianCardLibrary.sectarian}/{rankLibrary.rank}/{cardModel.cardName}", cardModel); } } } } tree.Add("多人模式牌库", cardLibraryInfo); foreach (var levelLibrary in cardLibraryInfo.levelLibries.Where(library => !library.isSingleMode)) { foreach (var sectarianCardLibrary in levelLibrary.sectarianCardLibraries) { tree.Add($"多人模式牌库/{sectarianCardLibrary.sectarian}", sectarianCardLibrary); foreach (var rankLibrary in sectarianCardLibrary.rankLibraries) { tree.Add($"多人模式牌库/{sectarianCardLibrary.sectarian}/{rankLibrary.rank}", rankLibrary); foreach (var cardModel in rankLibrary.cardModelInfos) { tree.Add($"多人模式牌库/{sectarianCardLibrary.sectarian}/{rankLibrary.rank}/{cardModel.cardName}", cardModel); } } } } //tree.EnumerateTree().AddIcons<CardLibraryInfo>(x => x.singleIcon); tree.EnumerateTree().AddIcons <SectarianCardLibrary>(x => x.icon); tree.EnumerateTree().AddIcons <RankLibrary>(x => x.icon); tree.EnumerateTree().AddIcons <CardModelInfo>(x => x.icon); instance = this; return(tree); }
public void SetMenuTree(OdinMenuTree tree) { TextureImpoterCfg.Instance.Load(); var texImporterView = new TextureImpoterView(); tree.Add(TAB_TEXTURE, texImporterView, EditorIcons.SettingsCog); var dict = AMTool.GetDictionary(TextureImpoterCfg.Instance.TextureSettings); foreach (var item in dict) { string path = item.Key.Replace(Application.dataPath, TAB_TEXTURE); tree.Add(path, item.Value); } tree.Selection.SelectionChanged -= OnSelectionItemChange; tree.Selection.SelectionChanged += OnSelectionItemChange; }
protected override OdinMenuTree BuildMenuTree() { tree = new OdinMenuTree(); tree.Selection.SupportsMultiSelect = false; tree.Add("EditorWindow", m_bake_depth_to_vertex_color_component); tree.Selection.SelectionChanged += OnSelectionChanged; TrySelectMenuItemWithObject(m_bake_depth_to_vertex_color_component); return(tree); }
protected override OdinMenuTree BuildMenuTree() { var tree = new OdinMenuTree(); tree.Selection.SupportsMultiSelect = false; tree.Add("+ Create New Item", new CreateNewItemData()); tree.AddAllAssetsAtPath("Item Data", ITEM_DATA_FILEPATH, typeof(SOFabricatorItem)); return(tree); }