From 42757bab36e1f5b8e155b3181dc9a449f0c91087 Mon Sep 17 00:00:00 2001 From: atdunbg Date: Mon, 5 Oct 2026 00:39:48 +0800 Subject: [PATCH] AssetManager: drop immediate SaveGUIDRegistry on registration 2268fa5 added the dirty-flag deferred flush but left the immediate save in place, so new GUID registrations wrote the registry twice (once inline, once at the next FlushGUIDRegistry). Remove the inline save so the deferred path is the only writer. --- Engine/src/Assets/AssetManager.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Engine/src/Assets/AssetManager.cpp b/Engine/src/Assets/AssetManager.cpp index c55d3dd..abc3f63 100644 --- a/Engine/src/Assets/AssetManager.cpp +++ b/Engine/src/Assets/AssetManager.cpp @@ -49,8 +49,7 @@ namespace Engine::Assets { m_PathToGuid.emplace(path, guid); m_GuidToPath.emplace(guid, path); - SaveGUIDRegistry(); - m_GuidRegistryDirty = true; + m_GuidRegistryDirty = true; // 延迟落盘:由 FlushGUIDRegistry 统一写 return guid; }