diff --git a/Development~/UnityProject/Assets/Editor.meta b/Development~/UnityProject/Assets/Editor.meta new file mode 100644 index 0000000..27f6b95 --- /dev/null +++ b/Development~/UnityProject/Assets/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7a6ed64b6b38b5e4eae9b86516add8b7 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Development~/UnityProject/Assets/Editor/ShrinkInstallerDevelopmentValidation.cs b/Development~/UnityProject/Assets/Editor/ShrinkInstallerDevelopmentValidation.cs new file mode 100644 index 0000000..eb33aea --- /dev/null +++ b/Development~/UnityProject/Assets/Editor/ShrinkInstallerDevelopmentValidation.cs @@ -0,0 +1,74 @@ +#if UNITY_EDITOR +using System; +using System.Collections; +using System.Linq; +using System.Reflection; +using UnityEditor; +using UnityEngine; +using UnityEngine.UIElements; + +public static class ShrinkInstallerDevelopmentValidation +{ + public static void Run() + { + try + { + var windowType = FindType("ShrinkSDK.Installer.ShrinkSdkInstallerWindow"); + var window = ScriptableObject.CreateInstance(windowType) as EditorWindow + ?? throw new InvalidOperationException("无法创建包管理窗口。"); + try + { + windowType.GetMethod("CreateGUI", BindingFlags.Public | BindingFlags.Instance)?.Invoke(window, null); + var texts = window.rootVisualElement.Query