Reputation: 387
I'm working in Unity 2021.1.28 using git as version control. When I went to a earlier branch of my project that had been working fine, it was now broken. The project was missing materials and referring to stuff in the newer branch.
The question is why was the branch broken when I returned to it even though it was working fine when commited and how can I fix it?
Upvotes: 0
Views: 910
Reputation: 387
The reason that the branch was broken when I returned to it is that the Library folder, which is essentially a cache, is not in version control.
The fix is to simply, close Unity, delete the Library folder after changing branches, and reopen the project. Unity will restore the Library folder with the exception of some settings, such as which scene is open and what platform you are building for, which you will have to reassign.
Upvotes: 1