using System.Linq; using Sirenix.Utilities.Editor; using UnityEditor; using UnityEngine; namespace Ether { public class TableEditorWindow : OdinWindowBase { [MenuItem("配置/表格配置 %t")] private static void OpenWindow() { var window = GetWindow(); window.titleContent = new GUIContent("表格配置"); TableProvider.ResetCounter(); } protected override void OnInit() { DrawSearchToolbar = true; AddSubWindow("道具配置"); AddSubWindow("道具配置/道具列表"); } protected override void OnBeginDrawEditors() { var selected = this.MenuTree.Selection.FirstOrDefault(); var toolbarHeight = this.MenuTree.Config.SearchToolbarHeight; // Draws a toolbar with the name of the currently selected menu item. SirenixEditorGUI.BeginHorizontalToolbar(toolbarHeight); { if (selected != null) { GUILayout.Label(selected.Name); } // if (SirenixEditorGUI.ToolbarButton(new GUIContent("Create Item"))) // { // // } } SirenixEditorGUI.EndHorizontalToolbar(); } } }