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

Store _custom_type_script meta as String #102737

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Feb 12, 2025

Fixes #102551

Makes custom type script stored as Script's UID instead of reference. This avoids all issues with accidental saving of script (like #100154, so #101001 is no longer needed for this particular case).

@KoBeWi KoBeWi added this to the 4.4 milestone Feb 12, 2025
@KoBeWi KoBeWi requested a review from a team as a code owner February 12, 2025 00:00
Comment on lines +302 to +307
if (custom_script.get_type() == Variant::OBJECT) {
// Convert old script meta.
Ref<Script> script_object(custom_script);
assign_custom_type_script(const_cast<Object *>(p_object), script_object);
return script_object;
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Bonus conversion code, only relevant for Resources/Nodes created in 4.4.

@KoBeWi KoBeWi force-pushed the uids_are_creeping_everywhere branch from 24c20d6 to 38d0e82 Compare February 12, 2025 00:22
@akien-mga akien-mga added the bug label Feb 12, 2025
@akien-mga akien-mga merged commit c6b6278 into godotengine:master Feb 12, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

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.

Deserializing custom resource created through inspector results in parser error
2 participants