How do I fix a corrupted project?

I have a work project that for some reason, isn’t opening. I spoke to Unity Technologies and they worked out that the project is corrupted and said that I should come here.

Stuff first started happening when I tried opening the project in Unity Hub. What happened was the splash window opened, the progress bar appeared and loaded unnaturally quickly, and then the splash window closed without opening the editor. I don’t know why this happened but I couldn’t fix it.

I don’t know how it got corrupted but I assume one of two things happened. One is that I messed up using Git Hub somehow. Two is that after the project wouldn’t open I tried opening it in a different version of the editor. I don’t think I did this correctly though. I believe it’s the first one as it happened before the project wouldn’t open.

If I need to attach any log files or stuff like that just ask.

All help is much appreciated, thanks in advance!

Are you able to create a brand new project? If so, then one path forward would be to create a new/empty project, then import your scripts, packages and assets from the other project one at a time. Do it slowly and make sure it compiles each time, and make a back up after each successful import in case one asset is causing the issue.

If you properly source-controlled it in git, restore it somewhere else (another path, another computer, etc.) and try and open it there.

Or try a slightly-earlier version in your git history.

When you properly source control something, obviously ALL necessary files must be committed. Here’s more generic info:

Personally I use git (completely outside of Unity) because it is free and there are tons of tutorials out there to help you set it up as well as free places to host your repo (BitBucket, Github, Gitlab, etc.).

As far as configuring Unity to play nice with git, keep this in mind:

https://discussions.unity.com/t/736093/3

Here’s how I use git in one of my games, Jetpack Kurt:

https://discussions.unity.com/t/807568/3

Using fine-grained source control as you work to refine your engineering:

https://discussions.unity.com/t/826718/2

Share/Sharing source code between projects:

https://discussions.unity.com/t/719810/2

Setting up an appropriate .gitignore file for Unity3D:

https://discussions.unity.com/t/834885/5

Generally setting Unity up (includes above .gitignore concepts):

https://thoughtbot.com/blog/how-to-git-with-unity

It is only simple economics that you must expend as much effort into backing it up as you feel the work is worth in the first place.

“Use source control or you will be really sad sooner or later.” - StarManta on the Unity3D forum boards

Try deleting the “library” folder that’s in your project folder and then open your project. You might want to make a back-up before doing that.