I was in play mode, I clicked “stop the play mode” and “close the editor” quickly, I assumed it would wait until play mode was stopped, then it would ask me if I wanted to save the changes then it would close the editor like always, but no, this time it just immediately closed the editor, when I opened the project again the scene lost all the changes I did today, the code is fine, it didn’t lose anything.
am using Unity 2022.3.20f1, is there any hope? or should I just start over again?
just noticed this issue happens all the time, if i clicked close the editor, while its in play mode it will immediately close, without asking me if i want to save the changes to the scene or not.
When you’re in play mode, the scene(s) that you see in the editor is not the same copy as before playing. It makes a clone of the scene as a playtime version. It makes sense that the app would ignore those changes. But you’re right, it should not close the app while the live Editor scenes (assets possibly marked dirty) are still unsaved.
Lesson until they fix it (if they decide it needs fixing): don’t close the app from Play mode.
Does the scene display the universal “unsaved changes” symbol: * ?
As in: ThisIsMyScene*
If not, then the scene has no changes.
If you make edits through 3rd party tools, or your own, but the scene doesn’t show the * symbol, then these editor tools are to blame because they should mark the scene as dirty.
If the scene does have the * and the editor still closes without asking to save changes, try to reproduce this in an empty project. If that has the same issue, please report a bug.