Optimize Asset::GetPath in cooked build

This commit is contained in:
Wojtek Figat
2025-07-29 21:41:59 +02:00
parent b8218e9ab4
commit 6d05bf16b1
12 changed files with 79 additions and 54 deletions

View File

@@ -521,7 +521,7 @@ bool Content::GetAssetInfo(const StringView& path, AssetInfo& info)
#endif
}
String Content::GetEditorAssetPath(const Guid& id)
StringView Content::GetEditorAssetPath(const Guid& id)
{
return Cache.GetEditorAssetPath(id);
}
@@ -749,6 +749,7 @@ void Content::DeleteAsset(const StringView& path)
return;
}
#if USE_EDITOR
ScopeLock locker(AssetsLocker);
// Remove from registry
@@ -765,6 +766,7 @@ void Content::DeleteAsset(const StringView& path)
// Delete file
deleteFileSafety(path, info.ID);
#endif
}
void Content::deleteFileSafety(const StringView& path, const Guid& id)