Skip to content

Commit

Permalink
Merge pull request godotengine#64812 from Life4gal/fix-issue-57506
Browse files Browse the repository at this point in the history
Fix using Resource objects as keys in the `tres` format
  • Loading branch information
akien-mga committed Jan 19, 2023
2 parents 6262c89 + d3612e0 commit 122106c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scene/resources/resource_format_text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 122106c

Please sign in to comment.