recover script instead of autosave?

when opening my script it asked me if I wanted to open it or the autosave it found. The auto save is the one I opened, but apparently was the wrong one and missing a LOT of my code.
Is there any way to get the last save of it instead?
I do have a build version with the exe and _data folder, but no idea how to turn that back into my scripts.

If the code in question doesn’t contain coroutines, you can use ILSpy to decompile the assemblies from your build to C#. Just open the assemblies in ILSpy and extract the code. It can of course recover UnityScript - scripts as well, but only as C# code :wink: AFAIK there is no UnityScript decompiler out there since UnityScript is an artificial language which only exists in Unity.

Just take a look into your _Data folder: _Data/Managed/

The dlls that start with “Assembly-” contains your scripts


If you have trouble to get it working, upload your assemblies somewhere and post them here. I can extract them for you, but’s it’s actually not that hard :wink:

Consider using a version control system such as Subversion or Git (which are both free). And do regular backups of your project.

I just had this, and it deleted my local git as well which was in the same directory (lesson learnt). I also didn’t have the assembly file, however, I did have a recent build of my game (the night before), you can find a copy of the Assembly-CSharp.dll in the _Data/Managed folder.