From 473e52c5baae58e52b12e01f503935fe88464da6 Mon Sep 17 00:00:00 2001 From: hevinci Date: Sat, 19 Mar 2022 00:42:20 +0800 Subject: [PATCH] Update AssetBundleCollector --- .../AssetBundleCollector/AssetBundleCollectorSetting.cs | 6 +++--- .../AssetBundleCollectorSettingData.cs | 8 ++++---- .../AssetBundleCollector/AssetBundleCollectorWindow.cs | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorSetting.cs b/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorSetting.cs index 547e87b..183e2ae 100644 --- a/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorSetting.cs +++ b/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorSetting.cs @@ -51,12 +51,12 @@ namespace YooAsset.Editor } /// - /// 是否收集全路径的着色器 + /// 自动收集着色器 /// - public bool IsCollectAllShaders = false; + public bool AutoCollectShaders = false; /// - /// 收集的着色器Bundle名称 + /// 自动收集的着色器资源包名 /// public string ShadersBundleName = "myshaders"; diff --git a/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorSettingData.cs b/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorSettingData.cs index cc4989b..572e40c 100644 --- a/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorSettingData.cs +++ b/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorSettingData.cs @@ -157,7 +157,7 @@ namespace YooAsset.Editor { if (string.IsNullOrEmpty(shadersBundleName)) return; - Setting.IsCollectAllShaders = isCollectAllShaders; + Setting.AutoCollectShaders = isCollectAllShaders; Setting.ShadersBundleName = shadersBundleName; SaveFile(); } @@ -336,7 +336,7 @@ namespace YooAsset.Editor } private static bool IsCollectAsset(string assetPath, string filterRuleName) { - if (Setting.IsCollectAllShaders) + if (Setting.AutoCollectShaders) { Type assetType = AssetDatabase.GetMainAssetTypeAtPath(assetPath); if (assetType == typeof(UnityEngine.Shader)) @@ -354,7 +354,7 @@ namespace YooAsset.Editor public static bool HasCollector(string assetPath) { // 如果收集全路径着色器 - if (Setting.IsCollectAllShaders) + if (Setting.AutoCollectShaders) { System.Type assetType = AssetDatabase.GetMainAssetTypeAtPath(assetPath); if (assetType == typeof(UnityEngine.Shader)) @@ -400,7 +400,7 @@ namespace YooAsset.Editor public static string GetBundleLabel(string assetPath) { // 如果收集全路径着色器 - if (Setting.IsCollectAllShaders) + if (Setting.AutoCollectShaders) { System.Type assetType = AssetDatabase.GetMainAssetTypeAtPath(assetPath); if (assetType == typeof(UnityEngine.Shader)) diff --git a/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorWindow.cs b/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorWindow.cs index 5d80dd4..0c14a1b 100644 --- a/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorWindow.cs +++ b/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorWindow.cs @@ -101,7 +101,7 @@ namespace YooAsset.Editor } private void OnDrawShader() { - bool isCollectAllShader = AssetBundleCollectorSettingData.Setting.IsCollectAllShaders; + bool isCollectAllShader = AssetBundleCollectorSettingData.Setting.AutoCollectShaders; string shadersBundleName = AssetBundleCollectorSettingData.Setting.ShadersBundleName; EditorGUILayout.Space();