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

Tool scripts modified from the in-engine script editor don't update #97238

Closed
SaracenOne opened this issue Sep 20, 2024 · 4 comments
Closed

Tool scripts modified from the in-engine script editor don't update #97238

SaracenOne opened this issue Sep 20, 2024 · 4 comments

Comments

@SaracenOne
Copy link
Member

SaracenOne commented Sep 20, 2024

Tested versions

4542516

System information

Windows 11

Issue description

It seems a recent PR, while intended to fix updating script properties when editing script properties from external editors, caused similar issues when updating scripts from the in-engine editor, including the entire script failing to update, not just the property panel.

The problem seems to actually be specific to tool scripts, and the behaviour is only noticed after a regular script is converted to a tool script and the project is reloaded. After this point, it becomes impossible to update the script. The error Condition "!p_keep_state && has_instances" is true. Returning: ERR_ALREADY_IN_USE is also visible upon saving this script for the first time.

Bisected to a regression in commit 46edd6d

Steps to reproduce

  • Open the project and test scene
  • In the script assigned the root node, modify the name of the test1 property to something else.
  • Save the script and observe the error.
  • Click on another node in the scene tree and back to the root node.
  • The root node's inspector may have changed, but repeat the step of renaming the exported property once again and observe that the inspector will stop updating, becoming stuck after the first attempt to update it.

Minimal reproduction project (MRP)

gdscript_test.zip

@ryevdokimov
Copy link
Contributor

@Hilderin

Maybe: #97168 will fix the issue, it at least resolves the error.

@Hilderin
Copy link
Contributor

Yes, #97168 will fix the error message and the fact that tool scripts are not reloaded anymore.

@SaracenOne
Copy link
Member Author

Yes, can confirm that that PR does indeed fix this issue.

@SaracenOne
Copy link
Member Author

Closed by #97168

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

No branches or pull requests

3 participants