Unity ERASED months work of progress
I was working on my game the day that this happened, and a folder got deleted (I might have accidentally deleted it somehow), and now all of my scenes are GONE (each scene's objects were under one parent per scene, then were made into prefabs). I've tried recovering the files using free alternatives, but to no avail currently. At the time this question is being written, I am deleting the Library folder to see if re-importing the Assets will save them (I did find the prefab and meta files) and running 2 file recovery software applications to see if they bring up more things.
Any tips (besides backing it up to a machine EVERY TIME I change the main project)?
EDIT (2/21/2016): I managed to recover almost all of the prefab and meta files, but Unity gives me this error:
RI.Hid failed to create device file: 2 the system cannot find the file specified
And it only happens with the scene prefabs (I did recover an enemy prefab successfully). Can this be fixed? If so, how?
Another error:
Unable to parse YAML file: (Control characters are not allowed) and (Invalid leading UTF-8 octet) at line 0 (this happened to not only the YAML files (whatever those are), but the meta files as well)
EDIT (2/22/2016) :
I managed to find the scenes before the incident above happened, but I can't find a recovery system that'll let me do it for free, and I don't want to waste $100 on a system that doesn't work. Any suggestions on a good system?
Windows? No such thing as accidentally deleted. Its either in your recycle bin or you accidentally dragged the folder in to another folder.
Tried perfor$$anonymous$$g a Simple Search on your machine??
There are fundamental things mentioned in the manual to stop things like this happening. These include, opening your scene file straight after opening Unity, every time (Dont rely on "Last saved state" of editor). $$anonymous$$aking sure to save you project as well as your scene.
None of that worked. It's gone.
I have been saving the scene and the project regularly as well.
Answer by phil_me_up · Feb 21, 2016 at 12:01 PM
This is a wonderful reason why using SCM (Git / Perforce / Mercurial etc) is highly recommended!
Once you've got it set up, all you need to do is commit the files you've changed to source control and that's it, you've backed up. Not only have you backed up, you've also got a complete history of all your changes. If you've messed something up or just wish to revert back to an older version of a file, it's all there for you. Deleted a file? No problem, just recover it from source control.
There are plenty of source control options out there for you, and the one you use depends on your project, amount of data you have and of course the way you want to work, but spending a bit of time learning about how to use them is very recommended.
For obvious reasons, having this back up to an offsite server is recommended, as if your hard-drive dies you've not lost anything.