Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AnimationLibrary loading #96577

Merged

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Sep 4, 2024

Fixes #96553
Seems like the String/StringName key unification only applies to GDScript, raw Dictionaries still differentiate between the two.

Dictionary access uses Variant anyway, so using converted key was pointless. The Variant passed to add_animation_library() is converted implicitly. It doesn't matter if it's stored in a variable or not.

@KoBeWi KoBeWi added this to the 4.4 milestone Sep 4, 2024
@KoBeWi KoBeWi requested a review from a team as a code owner September 4, 2024 22:11
Copy link
Contributor

@rune-scape rune-scape left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this .. shouldn't be the case, dictionaries use a hashmap defined with StringLikeVariantComparator, so
converting a String key to StringName, then getting the value for that StringName should always work like expected in GDScript.
id like to find the root bug, but it seems to fix the issue

@akien-mga akien-mga merged commit 10c8e89 into godotengine:master Sep 5, 2024
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@KoBeWi KoBeWi deleted the reject_StringName,_return_to_Variant branch September 5, 2024 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Animation lost when opening projects created in 4.3
4 participants