summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-19 13:24:02 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-19 13:24:02 +0100
commit122106c8446046c58c65d96132b944089ebb5602 (patch)
tree6dbefc773ffb9340a6de25d1ab3fce86277168ee /scene
parent6262c89b8c1b31221e722cc6092364517f53dcd6 (diff)
parentd3612e039aca7b08028c35a35e33b66cf2c9ad14 (diff)
Merge pull request #64812 from Life4gal/fix-issue-57506
Fix using Resource objects as keys in the `tres` format
Diffstat (limited to 'scene')
-rw-r--r--scene/resources/resource_format_text.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp
index 80b9ff3f38..c85c213c5d 100644
--- a/scene/resources/resource_format_text.cpp
+++ b/scene/resources/resource_format_text.cpp
@@ -1846,6 +1846,9 @@ void ResourceFormatSaverTextInstance::_find_resources(const Variant &p_variant,
List<Variant> keys;
d.get_key_list(&keys);
for (const Variant &E : keys) {
+ // Of course keys should also be cached, after all we can't prevent users from using resources as keys, right?
+ // See also ResourceFormatSaverBinaryInstance::_find_resources (when p_variant is of type Variant::DICTIONARY)
+ _find_resources(E);
Variant v = d[E];
_find_resources(v);
}