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

Built-in scripts of child nodes in editor require editor restart to reload #92157

Open
KoBeWi opened this issue May 20, 2024 · 2 comments · May be fixed by #92177
Open

Built-in scripts of child nodes in editor require editor restart to reload #92157

KoBeWi opened this issue May 20, 2024 · 2 comments · May be fixed by #92177

Comments

@KoBeWi
Copy link
Member

KoBeWi commented May 20, 2024

Tested versions

4.3 dev6 broken
4.2 works

System information

Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 (NVIDIA; 31.0.15.4633) - Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 Threads)

Issue description

If you have a built-in script in a preloaded scene, and the script is attached to a child node, not root, and you also use the script as part of editor plugin, any changes to the script will be ignored and you need to restart editor to update it. This used to work in older versions.

Also this error prints when opening the affected scene while the plugin is active:
modules/gdscript/gdscript.cpp:741 - Condition "!p_keep_state && has_instances" is true. Returning: ERR_ALREADY_IN_USE

Steps to reproduce

  1. Open the MRP
  2. Go to Screen X
  3. Press Test button
  4. Open MainScreen.tscn
  5. Edit the script inside Button
  6. Change to a different text
  7. Again in Screen X, press Test
  8. The printed text is the same

You can run the same project in Godot 4.2 and the text changes.

Minimal reproduction project (MRP)

deadscripts.zip

@KoBeWi
Copy link
Member Author

KoBeWi commented May 20, 2024

Seems to have broken between 4.3 dev3 and dev4.
I tried reverting #85501. It fixes the error, but not the reload issue, so it's something else.

@KoBeWi
Copy link
Member Author

KoBeWi commented May 20, 2024

Bisected to 2e09985 ;_;

EDIT:
Also it's specifically from changes in resource_loader.cpp, not editor_node.cpp.

@KoBeWi KoBeWi linked a pull request May 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Bad
Development

Successfully merging a pull request may close this issue.

1 participant