-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Unsaved scripts don't prompt when closing editor #55026
Comments
Sorry, I had this open in a different tab and copied the wrong issue tag... oops |
@KoBeWi Should a 'save script' dialogue appear for each unsaved script, or just a 'save all script changes' overall dialogue; or should this be an option toggled via the settings like for scenes? |
I think it should be an overall dialog, like we do for unsaved scenes. |
@Calinou I have an effectively complete solution working at this point, but I've run into a problem. Built-in scripts don't seem to get a 'modified' status (though they are recognised as unsaved when quitting), and furthermore aren't saved by the |
The PR should be made against master branch first. |
Ah, ok - because the 3.4 version is included in this issue I assumed it was for 3.x, so made my changes on that version. Should I make separate pull requests for 3.x and 4.0? I don't really know how it's done on GitHub yet.
|
Depends on how much different they are. Sometimes the changes are the same for both branches, so the commit can be cherry-picked. But if they are too different, 3.x needs a separate PR. |
That makes sense, thank you (;
|
There's one aspect of my changes (and my changes in 3.x) that I don't like; I had to add a variable |
Is this still relevant? |
I also tested it in 3.4 — scripts are saved |
That's a bug: #18010 |
Well yeah built-in scripts are not saved when project reloading. |
Just providing an update: I found my PR again recently, and have reworked it to work again and to remove poor practices such as the above unnecessary statefulness. I'm happy with how it works now, though shaders and built-in scripts would definitely benefit from special handling in future.
Built-in scripts are saved when their scene is saved, which means there is some additional weirdness and inconsistency in the saving system. I've addressed this temporarily by displaying a warning with the list of unsaved built-in scripts (since their scenes will be saved without prompting), but it should be addressed fully whenever possible. |
Godot version
098e3cf / 3.4
System information
W10
Issue description
When you modify a script, it gets the "modified" status, but it's ignored by the editor. When you quit, any script changes are lost. Only unsaved scenes are handled.
Resolving this would effectively resolve #36281 (after #54653)
Steps to reproduce
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: