From b766df1d31949a41d19812b648d7331d23ac53e5 Mon Sep 17 00:00:00 2001 From: hevinci Date: Thu, 17 Aug 2023 21:18:21 +0800 Subject: [PATCH] update shader variant collector --- .../ShaderVariantCollectionManifest.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Assets/YooAsset/Editor/ShaderVariantCollector/ShaderVariantCollectionManifest.cs b/Assets/YooAsset/Editor/ShaderVariantCollector/ShaderVariantCollectionManifest.cs index 54ff134..472638e 100644 --- a/Assets/YooAsset/Editor/ShaderVariantCollector/ShaderVariantCollectionManifest.cs +++ b/Assets/YooAsset/Editor/ShaderVariantCollector/ShaderVariantCollectionManifest.cs @@ -30,17 +30,22 @@ namespace YooAsset.Editor public class ShaderVariantInfo { /// - /// Shader asset path in editor. + /// 着色器资源路径. /// public string AssetPath; /// - /// Shader name. + /// 着色器名称 /// public string ShaderName; /// - /// Shader variants elements list. + /// 着色器变种总数 + /// + public int ShaderVariantCount = 0; + + /// + /// 着色器变种列表 /// public List ShaderVariantElements = new List(1000); } @@ -71,6 +76,7 @@ namespace YooAsset.Editor element.PassType = passType; element.Keywords = keywords; info.ShaderVariantElements.Add(element); + info.ShaderVariantCount++; } private ShaderVariantInfo GetOrCreateShaderVariantInfo(string assetPath, string shaderName) {