Skip to content

Fix exported variable type mismatch after script change #109405

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

no-arr
Copy link

@no-arr no-arr commented Aug 7, 2025

Fixes: #68015

clip.2.mp4

Definitely not the best. This does have support for both C# and GDScript exported variables. I've done testing and it works for custom classes too. Inside PlaceHolderScriptInstance::update we check if the value of the exported variable would be an object or not and then if the exported variable does have a value: we compare it with the new expected variables type and reset the value if not appropriate. There may still be some edge cases I haven't accounted for, but I wasn't able to find any during testing.

I'm open for any constructive criticism or feedback. Thank you.

@no-arr no-arr requested a review from a team as a code owner August 7, 2025 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Changing export type hint after assigning a Node does not check for invalid type.
1 participant