- Home /
Please Help! Revert changes!
I just imported a package into my project that overwrote my script that I spent a week coding!! :( 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?
When I go to the file properties and go to "Previous Versions" I get an error on reverting. http://tinypic.com/r/f1clyg/7
Is that $$anonymous$$ac? I always hated how $$anonymous$$ac deletes everything in a folder rather than letting things sit there, and just overwrite new stuff.
no I'm using a PC. But I imported a package that had the same script name and it overwrote
Answer by zachypin · Aug 01, 2011 at 11:28 PM
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
Answer by DaveA · Aug 01, 2011 at 10:15 PM
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.
I was using $$anonymous$$onoDevelop, but that preference isn't default so no :( Why wouldn't it be default, this is frustrating
We've all been there. It isn't a program until it's had to be recoded at least once. Take heart that your rewrite will be better, benefiting from the experience gained the first time.
I was able to find Unity3D Obfuscator which seems like the tool to use. But it won't dl on my PC. Unity just doesn't want me to have that code.