Accidetly deleted all my scripts. How do I recover them?

I accidently deleted all my scripts in unity. Theres no way some one would design a program that would flat out delete all things with out some fail safe. Can any one help me recover them? Thanks in advance.

i have faced this many times and all i do is just go to recycle bin and restore the file and i am again all good to go…so don’t worry it happens…Cheers…Enjoy…

Try this. If you dont have assembly files i think you are gonna be in bad mood. I dont think Mono has built in versioning.

Try a file recovery software…something like Pandora Recovery…not sure if it’ll work but worth a try i guess.

If you didn’t recompile your app after the data lost, you should be able to recover file path_to_your_project/Library/ScriptAssemblies/Assembly-CSharp.dll. I used “Pandora recovery” (free) for that. Than you can employ “ILSpy” to decompile it to sources and voila. Good luck

Here’s what I found is the fastest way to recover your files: Quick File Recovery Steps from Unity3d.Expert

(Full instructions with screenshots there. Just right click on the folder in the Project pane, and choose “Show in Explorer”. Then in Windows Explorer open the folder where your deleted was, and right-click, choosing the “Undo Delete” option.)

Hope this helps!

If someone still visit the question, here is the simple solution:

Just check your trash folder!!!

(don’t know if it works in Windows… with Mac it works fine)

sumaccamus

If for some reason Windows Undo doesn’t work from the script’s folder (say for example because you performed a lot of operations by downloading and unpacking ILSpy, realizing you had no hope of compiling it let alone using it correctly, and deleted it) just open your Recycle Bin, sort filed by date deleted and look for the script.

As a bonus, this method also works on UnityScript and Boo scripts!

Another option is back up your work, either by manually method like putting it in a Zip file or using version application(Git, SVN,…). I learn it the hard way and have start a habit to put all my code into a Zip file, which is less than 2mb in total, every morning and name it as back up file with date and version before start my editor and do stuff. Learn it the hard way countless time before I beat myself into that habit, and I had to deal with not only lost file, but bad code, and file version…

Check your recycle bin for it

You can just check windows Recycle Bin. Should be in there