Ever start Unity into playmode and have it crash out, or lock up forcing you to kill it, only to realize you didn’t save your scene? Wish unity had some kind of autosave built in?
Well – It kinda does! When you hit play in unity, it’ll save a copy of your current scene(s) open to load them back when you exit playmode (and thus, nothing stays changed!)
So if unity’s crashed out, first, stop! Don’t start unity back up! The backups will probably get cleared out either when you load the project, or definately will get cleared by the time you hit play!
Instead, go to your project folder, and find the Temp folder. Inside of there should be another folder called __Backupscenes!
Check inside, and you should have a file for each scene you had loaded simultaneously (generally, this will only be one)
The file will be named 0.backup. This is just a copy of the scene file you had open, as if you saved it before you hit play. To load it, copy it into your Assets folder (under scenes or wherever you want to put it), and rename it to a .unity file. I’d recommend not overwriting your old scene with this just set, name it something seperate for now! Load this scene up in unity and you should have your scene just as before you hit play!
Side note: Changes made to other files in the project may or may not get saved. So you may end up losing some changes to prefabs etc when this happens. This is why I’d recommend keeping the old copy of the scene too, just incase anything breaks in the new one!