-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Script editor soft-reload button doesn't seem to do anything #26326
Comments
After some testing I discovered that this option will "commit" changes to script resource without saving the file. The only actual use is to "reload" tool scripts, so they update without being saved (no idea how would that be useful). Is this option important? Maybe it could be removed or renamed, so it's less confusing? Or have functionality changed? |
Bump. Are there any use cases where reloading a script without saving it is desired? cc @vnen |
Though I noticed soft reload does do something. Break things after you do a renaming of the file. |
The reload option was added in f8f3066 Soft reload is the same as reload, but it passes godot/editor/plugins/script_text_editor.cpp Line 1368 in ba798d5
but it doesn't seem to work. (upon investigation, seems like hard-reloading uses a different method) And fun fact is that built-in tool scripts don't clear instances properly and can't be hard-reloaded, so while implementing #54662 I made them soft-reload. Which means that using built-in tool scripts is right now better option than external tool scripts🙃 Script reloading only affects tool scripts (because it reloads script instances and only tool scripts run in editor), hence renaming the menu option only brought confusion. IMO all scripts should default to soft-reloading (especially upon saving), which will solve many tool-script issues; and the soft-reload option should be replaced by hard-reload instead, and it should mention tool scripts again (actually, we could even disable it for non-tool scripts). EDIT: EDIT2: |
Godot version:
3.1 beta8
Issue description:
Menu option "Soft reload script" does nothing. At first I though it's an issue with built-in scripts, as when you change scene externally, there's no way to reload a built-in script (there should be IMO), other than reloading whole scene ofc.
But if you disable auto-reload of scripts and change a script externally and return to editor, you get a warning that script got changed. When you cancel the warning, there's no way reload script other than re-focusing editor. The soft reload button does nothing.
Steps to reproduce:
Good luck ;)
The text was updated successfully, but these errors were encountered: