Please Help! Revert changes!

I just imported a package into my project that overwrote my script that I spent a week coding!! :frowning:
Tell me I can get it back?

Edit:
I’ve found the unity3d file that has the code. Is there a way to pull it from that?

I found a backup version of my code. Open the folder where the code is saved. Right click the script and click “Restore Previous Version”. I clicked on this and when I double clicked the previous version I got an error. I right clicked it instead and said edit with notepad++ and I got it to open. Hope this works for others.

Note: Will need to download notepad++ if your copying my exact method, I also use Unity’s MonoDevelop

Hopefully you used MonoDevelop’s editor and had ‘Always create backup copy’ checked in the Preferences for Load/Save, or similar setting on another editor, or had made a backup. Otherwise, good luck.

I don’t know of any auto-backup feature in asset import, but that would be nice. Vote for that at feedback.unity3d.com

Actually, you may be able to pull it from a compiled file. I’ve never done it, but you can google for ‘.net decompiler’ or ‘csharp decompiler’ or something like that. I’ve heard that source (minus comments) is stored there. Which seems awfully horrid if you like to keep your IP rights.