I've had a strange error with Unity which keeps wiping virtually everything I've created. At the work office my project is fine, but when I try and pull it down from Source Tree at home, I get the following error from Unity: *Rebuilding Library because the asset database could not be found!*
**Summary:** To cut a long story short, the errors started since upgrading to 2019.1.13f, however, on my work PC the project works fine using Unity 2019.1.13f, but even though I have the same Unity at home, it won't work. If I download a version of the project from before the upgrade, it still works at home or at work, but for some reason any Git commit of the project after the upgrade will not work at home - the assets disappear when trying to run it. Following is the exact sequence of events and errors.
**Sequence of Events:** Previously I was using *Unity 2019.1.1* at home, which was fine. When I went to work and they added Unity Hub, I decided to upgrade to *2019.1.13f*. Everything was fine. No errors so far.
I didn't do any work on it at home for a bit. The next time I go to work on the project at home, I of course need to upgrade to 2019.1.13f, but it's not there in Unity HUB, only 2019.1.14f or 20119.2.2
So I tried *2019.2.2*. This was the first time I got the error. I also got an error saying something about problems with serialisation. All of my levels disappeared, anything that used serialisation pretty much, but some prefabs were still intact. Many assets just completely vanished.
I decided to delete the project, reclone a fresh copy off BitBucket, and try *2019.1.14f*. I got no errors mentioning serialisation, but the assets still disappeared with the error from the title.
Thinking maybe the error was to do with upgrading versions, I downloaded *2019.1.13f* off of the Unity legacy archives, deleted the project and got a new fresh clone. This time the project didn't ask to upgrade, but the same error happened, all assets gone.
I then downloaded the previous commit off BitBucket and opened it - it worked fine. Really strange. Deciding something went wrong with the commit, I left it for the night.
Back at work today, the project was fine. I committed all my latest changes at the end of the day, then tried it again at home tonight. The same issues happened.
Finally I uninstalled Unity at home tonight, and manually deleted Unity files from the *Program Files/Unity* folders and from *AppData/Roaming*.
I then re-installed *2019.1.13f* at home, the same version as at work. I then deleted the project once again off of my home PC, and re-cloned it. Didn't need to upgrade, but the assets still disappear at home, even though it was fine at work an hour previously.
**Final Thoughts:** I am at a loss as what to do to get it working at home. I've tried googling about this but could find nothing relevant to my specific issue.
The only thing I can absolutely determine is that the errors have started at home since upgrading to 2019.1.13f, however, the project works fine at work, but this error happens at home - even if using the same version of Unity.
**Git Ignore File:** Just in case it's relevant, here's my git ignore file:
[Ll]ibrary/
[Tt]emp/
[Oo]bj/
[Bb]uild/
[Bb]uilds/
Assets/AssetStoreTools*
# Visual Studio cache directory
.vs/
# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
.consulo/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
*.pdb
*.opendb
# Unity3D generated meta files
*.pidb.meta
*.pdb.meta
# Unity3D Generated File On Crash Reports
sysinfo.txt
# Builds
*.apk
*.unitypackage
↧