I accidentally deleted a terrain I’d worked on quite a bit. I figured since I hadn’t saved the scene yet, I could simply close without saving changes (which I did), and reopen it to find my terrain in the state it had been in before I’d begun the days work.
But it wasn’t there! The error said the terrain data was missing. I went looking for said data but have been unable to locate it. Any notions of how I might recover it? Or, even if it’s possible?
If not, the lesson learned will be that it’s possible to open a project, work on it, and lose that work even if you haven’t saved your changes…?
Depends on what you’re working on. If you mess around with a scene and don’t save changes, then nothing you did will be recorded. If you’re working directly on an asset (like a terrain), then whatever you do to it takes effect immediately.
i deleted my assets on accident too but it mine arent in the trash. I coppied over a folder called assets over my projects asset folder and everything inside was gone except what i tried copying into it. I assume the folders were going to merge not overwrite… Im on a mac so is there anyway to get those files back?
For future reference for anyone else finding this page, if you delete a folder (I just accidentally deleted my prefabs folder, instead of a specific prefab) from within Unity itself, it’s gone forever. IF you deleted it in Windows Explorer, it should go to the Recycle Bin (and equivalent for Mac of course). My own stupid fault, but really annoying!!! Now I need to find out if there’s a way to reverse link GameObjects back to a prefab, since I’ve already built a lot of scenes, and don’t really want to rebuild them all…
If you’re on Windows 7, just head over to your trash, choose the option to see the most recently deleted and click on it. On the popup, click ‘Restore’. Wait a few seconds, head back to Unity and it’s restored!
Hello! I accidentally deleted a prefab in Unity, and I was wondering if anyone knows where someone can find the recycling bin for Unity since I’m unaware of how to access it. Thanks!
I just deleted an entire terrain of carefully placed trees and plants and buildings. I tried ctrl z ing my way back but it said the data was lost and it is not in recycle bin. Does this mean its lost forever?
Yes, it’s gone forever. Just like they said in the other posts above from two years ago.
Source Code Version Control
For daily work, you should be using a Version Control System (VCS). This is like a time machine, saving a copy of your file between each set of changes you make, letting you recover an older version of the file before you made changes you don’t like, or recover the most recently saved version if you delete it. Every time you get to a stopping place where you added some new feature, check in with the VCS, so it will keep the latest changes for you.
There are many free and paid tools which offer VCS services, such as GitHub or Unity’s own PlasticSCM. Just be careful not to share third-party asset files into a public cloud account where you’re liable for unlicensed copies.
Regular Full Backups
Every time you reach a big milestone in your work, you should be making a full backup of your project to an external drive you keep in a safe place. This is for disaster recovery, in case you’re locked out of cloud system accounts or your computer explodes. A simple ZIP file of your whole project folder is fine. If you absolutely must shrink the size of your backups, you can skip adding the project’s Library sub-folder to your backups; it will take a little longer to restore but saves more than half of the data storage.
A full backup is not a convenient daily work VCS solution, and a VCS is not a full backup disaster recovery solution. You should do both, for Unity or any other computer work, like your college homework, your digital photo albums, or the documents for a multi-million dollar business.