Can I restore my unsaved scene after Unity crash?

Unity Editor crashed after pressing the Play button and all my changes are unsaved.

Cause

Unity saves your scene each time when you hit the Play button. It is not saved over the original scene file, instead it is saved in the project’s Temp directory.

Resolution

If you want to restore your scene file, you cannot re-launch Unity Editor after the crash. If you do, you will lose the scene file and all your progress with it!

If you want to restore your crashed scene, you have to go to your project’s directory (this is the folder that also contains the Assets directory) then enter the Temp/__Backupscenes directory. You will find the 0.backup file within. This is your saved scene file.

Now all you have to do is to copy this file and replace your previous scene file with the copy. You will need to set the file extension to unity in order to make this file recognizable as Unity scene file.

Please remember to backup your project folder before making this kind of changes. If you make any mistake, you can easily go back and try again.

11 Comments

Unity. I would be helpful for you to warn us aboutthat before we open our project and lose all of our work after making a level, game and other stuff the entire and afternoon. Gosh darn it. Now I still have empty materials and sripts but no level text or geometry.

i've had that situation. Unity crashed i wasn't surprised because it happens a lot on my machine, so i restarted unity as usual. but unlike the crashes before, this time the the whole scene was gone. while researching for a solution i figured out very quickly that i shouldn't have restarted it again.

the file recovery tools couldn't find anything to recover.

however, i managed to fix it.

in my case the deleted temp folder was in my trash. (!)

if you have this scenario follow the steps.

1. Save the Files from trash.

2. empty the temp folder in your untiy project.

3. copy the saved files in to your unity project temp folder

(NOW under "yourUnityProject\Temp\__Backupscenes" should be a file named "0.backup.")

4. Copy that "0.backup" file in your main "myUnityProjectFolder".

5. Rename "0.backup" to "yourProjectName.unity"

6. Start.

If you can compile your project and everythng works, congratulation!

(first i tried to put the "0.unity" in assets. that caused that all my textures were pink and unity created a new assets and library folder in the assets folder were i'v placed it. i had to do all steps again.)

anyway, i still couldnt run the project. the edior crashed with a 0 pointer error or somethig. the reason for that was a component in a model.

I tried looking for my Temp folder but none exist in the projects folder (or in any other folder that's connected with Unity for that matter...)

After a whole day of building a scene it just disappeared through one small mistake I made.

It's a shame that the developers have decided that such a simple thing like autosave is too much of a time waster, maybe it's because I am using a beta build (2018.2.14f1) and they don't want any leftovers when they call it a day..........

Have you considered data recovery software ? If the files are still there, as in not overwritten yet, they may still be recoverable using data recovery software such as DiskInternals Uneraser https://www.diskinternals.com/uneraser/ for data recovery. In any event, act fast, because Windows recycles freed up space quickly. So the files get overwritten with new data. If on your system drive, where the Windows OS is installed, chances of recovery may already be slim. Your chances of success increase exponentially if the files were deleted from a non system drive or USB stick or something. Success, Peter