From 52ac982481777d173051520ef1a3d35314f04136 Mon Sep 17 00:00:00 2001 From: hevinci Date: Mon, 17 Oct 2022 16:21:00 +0800 Subject: [PATCH] Update AssetBundleCollector --- .../Editor/AssetBundleCollector/AssetBundleCollector.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollector.cs b/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollector.cs index efb9a8d..bd2d0ed 100644 --- a/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollector.cs +++ b/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollector.cs @@ -266,7 +266,7 @@ namespace YooAsset.Editor private bool IsCollectAsset(string assetPath) { Type assetType = AssetDatabase.GetMainAssetTypeAtPath(assetPath); - if (assetType == typeof(UnityEngine.Shader)) + if (assetType == typeof(UnityEngine.Shader) || assetType == typeof(UnityEngine.ShaderVariantCollection)) return true; // 根据规则设置过滤资源文件 @@ -285,10 +285,8 @@ namespace YooAsset.Editor private string GetBundleName(AssetBundleCollectorGroup group, string assetPath) { System.Type assetType = AssetDatabase.GetMainAssetTypeAtPath(assetPath); - if (assetType == typeof(UnityEngine.Shader)) - { + if (assetType == typeof(UnityEngine.Shader) || assetType == typeof(UnityEngine.ShaderVariantCollection)) return EditorTools.GetRegularPath(YooAssetSettings.UnityShadersBundleName).ToLower(); - } // 根据规则设置获取资源包名称 IPackRule packRuleInstance = AssetBundleCollectorSettingData.GetPackRuleInstance(PackRuleName);