From 0d69d779f65589da43c65c205c38bffd2afff41b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?NKG=E4=B8=B6MadLife?= <1778139321@qq.com> Date: Sun, 10 Jul 2022 22:12:09 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8DShaderVariantColl?= =?UTF-8?q?ection=E5=88=B7=E6=96=B0=E4=B8=8D=E5=8F=8A=E6=97=B6=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ShaderVariantCollector/ShaderVariantCollectorWindow.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Assets/YooAsset/Editor/ShaderVariantCollector/ShaderVariantCollectorWindow.cs b/Assets/YooAsset/Editor/ShaderVariantCollector/ShaderVariantCollectorWindow.cs index 1652885..b166c70 100644 --- a/Assets/YooAsset/Editor/ShaderVariantCollector/ShaderVariantCollectorWindow.cs +++ b/Assets/YooAsset/Editor/ShaderVariantCollector/ShaderVariantCollectorWindow.cs @@ -34,6 +34,8 @@ namespace YooAsset.Editor EditorGUILayout.Space(); if (GUILayout.Button("搜集变种", GUILayout.MaxWidth(80))) { + // 先删除再保存,否则ShaderVariantCollection内容将无法及时刷新 + AssetDatabase.DeleteAsset(ShaderVariantCollectorSettingData.Setting.SavePath); ShaderVariantCollector.Run(ShaderVariantCollectorSettingData.Setting.SavePath); }