diff options
author | Juan <reduzio@gmail.com> | 2024-09-23 15:07:00 +0200 |
---|---|---|
committer | Juan <reduzio@gmail.com> | 2024-09-23 15:07:00 +0200 |
commit | abf9d245208542ccf883f6b61f0d3be486dc9447 (patch) | |
tree | 11acbe6601ef9f81587cce09be5645385e31dde5 /scene | |
parent | d5aadc38b459762fa74850777edb2ec8f6a02c16 (diff) | |
download | redot-engine-abf9d245208542ccf883f6b61f0d3be486dc9447.tar.gz |
Make internal unique scene resource ID deterministic
Changes the Resource::generate_scene_unique_id() to be deterministic and
seedable.
Fixes #97110
Diffstat (limited to 'scene')
-rw-r--r-- | scene/resources/resource_format_text.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp index d531eea311..5aa6bf718c 100644 --- a/scene/resources/resource_format_text.cpp +++ b/scene/resources/resource_format_text.cpp @@ -1708,6 +1708,8 @@ static String _resource_get_class(Ref<Resource> p_resource) { } Error ResourceFormatSaverTextInstance::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) { + Resource::seed_scene_unique_id(p_path.hash()); // Seeding for save path should make it deterministic for importers. + if (p_path.ends_with(".tscn")) { packed_scene = p_resource; } |