From c02eeef8462b6e9c291966d7566eeb9b4ddc30f7 Mon Sep 17 00:00:00 2001 From: hevinci Date: Thu, 20 Apr 2023 21:22:19 +0800 Subject: [PATCH] update edtior code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加home page菜单栏 --- .../AssetBundleBuilderWindow.cs | 2 +- .../AssetBundleCollectorWindow.cs | 2 +- .../AssetBundleDebuggerWindow.cs | 2 +- .../AssetBundleReporterWindow.cs | 2 +- Assets/YooAsset/Editor/HomePage.cs | 17 +++++++++++++++++ Assets/YooAsset/Editor/HomePage.cs.meta | 11 +++++++++++ .../ShaderVariantCollectorWindow.cs | 2 +- 7 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 Assets/YooAsset/Editor/HomePage.cs create mode 100644 Assets/YooAsset/Editor/HomePage.cs.meta diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderWindow.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderWindow.cs index 9e4b8ea..cfdf5da 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderWindow.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderWindow.cs @@ -12,7 +12,7 @@ namespace YooAsset.Editor public class AssetBundleBuilderWindow : EditorWindow { [MenuItem("YooAsset/AssetBundle Builder", false, 102)] - public static void ShowExample() + public static void OpenWindow() { AssetBundleBuilderWindow window = GetWindow("资源包构建工具", true, WindowsDefine.DockedWindowTypes); window.minSize = new Vector2(800, 600); diff --git a/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorWindow.cs b/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorWindow.cs index 7d9b049..839860c 100644 --- a/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorWindow.cs +++ b/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorWindow.cs @@ -12,7 +12,7 @@ namespace YooAsset.Editor public class AssetBundleCollectorWindow : EditorWindow { [MenuItem("YooAsset/AssetBundle Collector", false, 101)] - public static void ShowExample() + public static void OpenWindow() { AssetBundleCollectorWindow window = GetWindow("资源包收集工具", true, WindowsDefine.DockedWindowTypes); window.minSize = new Vector2(800, 600); diff --git a/Assets/YooAsset/Editor/AssetBundleDebugger/AssetBundleDebuggerWindow.cs b/Assets/YooAsset/Editor/AssetBundleDebugger/AssetBundleDebuggerWindow.cs index 19a3012..820edeb 100644 --- a/Assets/YooAsset/Editor/AssetBundleDebugger/AssetBundleDebuggerWindow.cs +++ b/Assets/YooAsset/Editor/AssetBundleDebugger/AssetBundleDebuggerWindow.cs @@ -13,7 +13,7 @@ namespace YooAsset.Editor public class AssetBundleDebuggerWindow : EditorWindow { [MenuItem("YooAsset/AssetBundle Debugger", false, 104)] - public static void ShowExample() + public static void OpenWindow() { AssetBundleDebuggerWindow wnd = GetWindow("资源包调试工具", true, WindowsDefine.DockedWindowTypes); wnd.minSize = new Vector2(800, 600); diff --git a/Assets/YooAsset/Editor/AssetBundleReporter/AssetBundleReporterWindow.cs b/Assets/YooAsset/Editor/AssetBundleReporter/AssetBundleReporterWindow.cs index 15009da..92d945a 100644 --- a/Assets/YooAsset/Editor/AssetBundleReporter/AssetBundleReporterWindow.cs +++ b/Assets/YooAsset/Editor/AssetBundleReporter/AssetBundleReporterWindow.cs @@ -10,7 +10,7 @@ namespace YooAsset.Editor public class AssetBundleReporterWindow : EditorWindow { [MenuItem("YooAsset/AssetBundle Reporter", false, 103)] - public static void ShowExample() + public static void OpenWindow() { AssetBundleReporterWindow window = GetWindow("资源包报告工具", true, WindowsDefine.DockedWindowTypes); window.minSize = new Vector2(800, 600); diff --git a/Assets/YooAsset/Editor/HomePage.cs b/Assets/YooAsset/Editor/HomePage.cs new file mode 100644 index 0000000..3f704df --- /dev/null +++ b/Assets/YooAsset/Editor/HomePage.cs @@ -0,0 +1,17 @@ +#if UNITY_2019_4_OR_NEWER +using System; +using UnityEditor; +using UnityEngine; + +namespace YooAsset.Editor +{ + internal class HomePageWindow + { + [MenuItem("YooAsset/Home Page", false, 1)] + public static void OpenWindow() + { + Application.OpenURL("https://www.yooasset.com/"); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/YooAsset/Editor/HomePage.cs.meta b/Assets/YooAsset/Editor/HomePage.cs.meta new file mode 100644 index 0000000..07c45c3 --- /dev/null +++ b/Assets/YooAsset/Editor/HomePage.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 901fc6964e7d483428830e2681899473 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/YooAsset/Editor/ShaderVariantCollector/ShaderVariantCollectorWindow.cs b/Assets/YooAsset/Editor/ShaderVariantCollector/ShaderVariantCollectorWindow.cs index 46e9d39..a1f39c2 100644 --- a/Assets/YooAsset/Editor/ShaderVariantCollector/ShaderVariantCollectorWindow.cs +++ b/Assets/YooAsset/Editor/ShaderVariantCollector/ShaderVariantCollectorWindow.cs @@ -12,7 +12,7 @@ namespace YooAsset.Editor public class ShaderVariantCollectorWindow : EditorWindow { [MenuItem("YooAsset/ShaderVariant Collector", false, 201)] - public static void ShowExample() + public static void OpenWindow() { ShaderVariantCollectorWindow window = GetWindow("着色器变种收集工具", true, WindowsDefine.DockedWindowTypes); window.minSize = new Vector2(800, 600);