fix:修复ShaderVariantCollection刷新不及时问题

pull/22/head
NKG丶MadLife 2022-07-10 22:12:09 +08:00
parent fb5e289de0
commit 0d69d779f6
1 changed files with 2 additions and 0 deletions

View File

@ -34,6 +34,8 @@ namespace YooAsset.Editor
EditorGUILayout.Space(); EditorGUILayout.Space();
if (GUILayout.Button("搜集变种", GUILayout.MaxWidth(80))) if (GUILayout.Button("搜集变种", GUILayout.MaxWidth(80)))
{ {
// 先删除再保存否则ShaderVariantCollection内容将无法及时刷新
AssetDatabase.DeleteAsset(ShaderVariantCollectorSettingData.Setting.SavePath);
ShaderVariantCollector.Run(ShaderVariantCollectorSettingData.Setting.SavePath); ShaderVariantCollector.Run(ShaderVariantCollectorSettingData.Setting.SavePath);
} }