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

GDScript does not update cached singleton references when GDExtension is reloaded #85004

Closed
DmitriySalnikov opened this issue Nov 17, 2023 · 1 comment · Fixed by #85373
Closed

Comments

@DmitriySalnikov
Copy link
Contributor

DmitriySalnikov commented Nov 17, 2023

Godot version

v4.2.rc.mono.custom_build [ad72de5]

System information

Windows 10

Issue description

As I pointed out several times earlier in #80284, the references to singletons in GDScript are still not updated after the GDExtension reload.

Code_X5GbuGGVab.1.1.mp4

Singletons themselves are updated and work correctly, but references to these singletons are not updated in @tool scripts. That is, Engine.get_singleton returns the actual working reference, but using the singleton directly through its name causes errors.

Steps to reproduce

Minimal reproduction project

https://github.com/DmitriySalnikov/gde_test_cases/tree/4.2.reload_singleton

@dsnopek
Copy link
Contributor

dsnopek commented Nov 17, 2023

Thanks for creating this issue!

I'm still not sure how to fix this - I think we'll need some help from the GDScript team to figure out how (or if it's even possible) to refresh those references.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants