diff --git a/Assets/Editor.meta b/Assets/Editor.meta new file mode 100644 index 0000000..55042b0 --- /dev/null +++ b/Assets/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 763cd4204ee50a244b029f2124b4d122 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Editor/Tool.cs b/Assets/Editor/Tool.cs new file mode 100644 index 0000000..b52c00d --- /dev/null +++ b/Assets/Editor/Tool.cs @@ -0,0 +1,142 @@ +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; +using UnityEngine.UIElements; +using System.IO; + +public class Tool : EditorWindow +{ + [SerializeField] + private VisualTreeAsset m_VisualTreeAsset = default; + + [MenuItem("Tool/工具箱")] + public static void ShowExample() + { + Tool wnd = GetWindow(); + wnd.titleContent = new GUIContent("工具箱"); + } + + //private string[] _materialsPath; + List _materialFolders = new List(); + public void CreateGUI() + { + VisualElement root = rootVisualElement; + VisualElement labelFromUXML = m_VisualTreeAsset.Instantiate(); + labelFromUXML.Q