Help! Unity Project Won’t Open Anymore!
I crashed Unity again, oh well…
This would be my usual response to Unity suddenly crashing on me. This happens quite a bit when I’m working with animations in particular, most likely because the project is stored in a network shared folder and can be a little slow to sync. But anyway, Unity suddenly announces its going to crash, we hit “close program”, we open Unity again, and the cycle of dev life continues. Most of the time.
Why won’t Unity open my project?
Occasionally we’ve managed to really do a number on our projects and Unity nopes right out of there, or tries really hard to open it and gets stuck in a non responsive state, great. When this happens we can initially be at a bit of a loss. If you’ve been working on a specific feature or piece of code you can generally gather that something is wrong with that. We backtrack, remove the offending asset and we should be good to go again. If you’re not one to save and test often (shame on you!) and you’re stuck with trying to figure out which of the numerous assets you’ve changed has caused the issue, then you’re still covered. Unity produces a log which you can view to help you pinpoint whats broken everything, by allowing you to see what it was loading when it crashed. From Windows 7 onward you can find the editor log in C:\Users\NAME\AppData\Local\Unity\Editor. However if your project has been corrupted in some way, after initially working fine, then it can be a much more stressful occurrence. In my case I had been happily working away on my laptop, which then suddenly decided to overheat and die (RIP)… Now like I said I store the project in a shared folder, so I only noticed something was wrong when I went to open the project on my work PC and low and behold… No response from Unity. I also use source control so I wouldn’t be losing that much if I couldn’t fix it, but I really wanted to keep my mornings work.
Making your project stable again.
So I Googled my way to victory and Unity eventually succeeded in opening my project again. In an effort to help anyone else facing a similar problem to me I’ve listed the steps I took to resolve my problem in order of extremes. And of course make a backup of your project before trying any of these steps.
- Remove any files in the root project folder with the term “Conflicted Copy” affixed to the file name.
- Remove the Temp folder from your project, apparently this can be enough to solve some users’ issues.
- Remove the metadata in the Library folder, this will cause Unity to have to re-import assets.
- Remove the BuildSetting.asset file in the Library folder.
- Remove the Library and Obj folders from your project completely.
Just to note I’m using Unity 5 so it doesn’t try to automatically open the last active project. If you are having this issue then I believe pressing and holding the Alt key after clicking on Unity opens the project dashboard. In the end removing the Library and Obj folder cleared out whatever files were causing the issue for me. I had to set up my workspace in Unity again but no actual work was lost so I’d call that a victory!