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 for Exported typed variables in a tool script have wrong initial value if not initialized #92114

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Hilderin
Copy link
Contributor

@Hilderin Hilderin commented May 19, 2024

This should fix #62363

The problem was caused by member_default_values_cache not initialized for tool scripts. When not a tool script, a PlaceHolder is created and _update_exports was called. But _update_exports was not called on the creation of GDScriptInstance. Later when the scene or the script is saved, _update_exports is called fixing the issue after the first save. So to fix the problem, I added a call to _update_exports when the GDScriptInstance is created.

@Hilderin Hilderin requested a review from a team as a code owner May 19, 2024 11:28
@Hilderin Hilderin changed the title Fix for Exported typed variables in a tool script have wrong initial value if not initialized #62363 Fix for Exported typed variables in a tool script have wrong initial value if not initialized May 19, 2024
@AThousandShips AThousandShips added this to the 4.3 milestone May 19, 2024
@Hilderin Hilderin force-pushed the fix_default_value_not_initialized branch 4 times, most recently from 821fbab to bbf4498 Compare May 20, 2024 11:51
@Hilderin Hilderin force-pushed the fix_default_value_not_initialized branch from bbf4498 to 8bb249b Compare May 20, 2024 12:02
@vnen vnen modified the milestones: 4.3, 4.4 Jul 25, 2024
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.

Exported typed variables in a tool script have wrong initial value if not initialized
3 participants