diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderWindow.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderWindow.cs index c42d344..aef52a2 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderWindow.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderWindow.cs @@ -14,8 +14,7 @@ namespace YooAsset.Editor [MenuItem("YooAsset/AssetBundle Builder", false, 102)] public static void ShowExample() { - AssetBundleBuilderWindow window = GetWindow(); - window.titleContent = new GUIContent("资源包构建工具"); + AssetBundleBuilderWindow window = GetWindow("资源包构建工具", true, EditorDefine.DockedWindowTypes); window.minSize = new Vector2(800, 600); } diff --git a/Assets/YooAsset/Editor/AssetBundleDebugger/AssetBundleDebuggerWindow.cs b/Assets/YooAsset/Editor/AssetBundleDebugger/AssetBundleDebuggerWindow.cs index 056a31d..e457939 100644 --- a/Assets/YooAsset/Editor/AssetBundleDebugger/AssetBundleDebuggerWindow.cs +++ b/Assets/YooAsset/Editor/AssetBundleDebugger/AssetBundleDebuggerWindow.cs @@ -11,8 +11,7 @@ namespace YooAsset.Editor [MenuItem("YooAsset/AssetBundle Debugger", false, 104)] public static void ShowExample() { - AssetBundleDebuggerWindow wnd = GetWindow(); - wnd.titleContent = new GUIContent("资源包调试工具"); + AssetBundleDebuggerWindow wnd = GetWindow("资源包调试工具", true, EditorDefine.DockedWindowTypes); wnd.minSize = new Vector2(800, 600); } diff --git a/Assets/YooAsset/Editor/AssetBundleGrouper/AssetBundleGrouperWindow.cs b/Assets/YooAsset/Editor/AssetBundleGrouper/AssetBundleGrouperWindow.cs index b51b5f7..7a6581a 100644 --- a/Assets/YooAsset/Editor/AssetBundleGrouper/AssetBundleGrouperWindow.cs +++ b/Assets/YooAsset/Editor/AssetBundleGrouper/AssetBundleGrouperWindow.cs @@ -14,8 +14,7 @@ namespace YooAsset.Editor [MenuItem("YooAsset/AssetBundle Grouper", false, 101)] public static void ShowExample() { - AssetBundleGrouperWindow window = GetWindow(); - window.titleContent = new GUIContent("资源包分组工具"); + AssetBundleGrouperWindow window = GetWindow("资源包分组工具", true, EditorDefine.DockedWindowTypes); window.minSize = new Vector2(800, 600); } diff --git a/Assets/YooAsset/Editor/AssetBundleReporter/AssetBundleReporterWindow.cs b/Assets/YooAsset/Editor/AssetBundleReporter/AssetBundleReporterWindow.cs index b55f0f7..394bba0 100644 --- a/Assets/YooAsset/Editor/AssetBundleReporter/AssetBundleReporterWindow.cs +++ b/Assets/YooAsset/Editor/AssetBundleReporter/AssetBundleReporterWindow.cs @@ -11,8 +11,7 @@ namespace YooAsset.Editor [MenuItem("YooAsset/AssetBundle Reporter", false, 103)] public static void ShowExample() { - AssetBundleReporterWindow window = GetWindow(); - window.titleContent = new GUIContent("资源包报告工具"); + AssetBundleReporterWindow window = GetWindow("资源包报告工具", true, EditorDefine.DockedWindowTypes); window.minSize = new Vector2(800, 600); } diff --git a/Assets/YooAsset/Editor/EditorDefine.cs b/Assets/YooAsset/Editor/EditorDefine.cs index 6ec6967..2fed369 100644 --- a/Assets/YooAsset/Editor/EditorDefine.cs +++ b/Assets/YooAsset/Editor/EditorDefine.cs @@ -1,4 +1,6 @@  +using System; + namespace YooAsset.Editor { public class EditorDefine @@ -12,6 +14,8 @@ namespace YooAsset.Editor /// 资源包分组工具的配置文件存储路径 /// public const string AssetBundleGrouperSettingFilePath = "Assets/YooAssetSetting/AssetBundleGrouperSetting.asset"; + + public static readonly Type[] DockedWindowTypes = { typeof(AssetBundleBuilderWindow), typeof(AssetBundleGrouperWindow), typeof(AssetBundleDebuggerWindow), typeof(AssetBundleReporterWindow) , typeof(ShaderVariantCollectionWindow)}; } /// diff --git a/Assets/YooAsset/Editor/ShaderVariantCollector/ShaderVariantCollectorWindow.cs b/Assets/YooAsset/Editor/ShaderVariantCollector/ShaderVariantCollectorWindow.cs index eaea085..a34b33b 100644 --- a/Assets/YooAsset/Editor/ShaderVariantCollector/ShaderVariantCollectorWindow.cs +++ b/Assets/YooAsset/Editor/ShaderVariantCollector/ShaderVariantCollectorWindow.cs @@ -12,7 +12,7 @@ namespace YooAsset.Editor { if (_thisInstance == null) { - _thisInstance = EditorWindow.GetWindow(typeof(ShaderVariantCollectionWindow), false, "着色器变种收集工具", true) as ShaderVariantCollectionWindow; + _thisInstance = GetWindow("ShaderVariant Collector", true, EditorDefine.DockedWindowTypes); _thisInstance.minSize = new Vector2(800, 600); } _thisInstance.Show();