diff --git a/UnityProject/Assets/TEngine/Editor/Postprocessor/SpritePostprocessor.cs b/UnityProject/Assets/TEngine/Editor/Postprocessor/SpritePostprocessor.cs index ab9220b1..c93292ae 100644 --- a/UnityProject/Assets/TEngine/Editor/Postprocessor/SpritePostprocessor.cs +++ b/UnityProject/Assets/TEngine/Editor/Postprocessor/SpritePostprocessor.cs @@ -397,6 +397,10 @@ public static class EditorSpriteSaveInfo atlas.Add(spriteList.ToArray()); AssetDatabase.CreateAsset(atlas, path); + if (File.Exists(pathv2)) + { + AssetDatabase.DeleteAsset(pathv2); + } File.Move(path, pathv2); AssetDatabase.Refresh(); } @@ -413,6 +417,7 @@ public static class EditorSpriteSaveInfo Init(); List needSaveAtlas = new List(); m_tempAllASprites.Clear(); + m_allASprites.Clear(); var findAssets = AssetDatabase.FindAssets("t:sprite", new[] { UIAtlasPath }); foreach (var findAsset in findAssets) {