Make internal unique scene resource ID deterministic

Changes the Resource::generate_scene_unique_id() to be deterministic and
seedable.

Fixes #97110
This commit is contained in:
Juan
2024-09-23 15:07:00 +02:00
parent d5aadc38b4
commit abf9d24520
4 changed files with 27 additions and 11 deletions

View File

@@ -2136,6 +2136,8 @@ static String _resource_get_class(Ref<Resource> p_resource) {
}
Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) {
Resource::seed_scene_unique_id(p_path.hash());
Error err;
Ref<FileAccess> f;
if (p_flags & ResourceSaver::FLAG_COMPRESS) {