Project Settings suddenly gone. 2022.3.41f1

I am using 2022.3.41f1. I got an error saying ‘unknown error occurred loading ProjectSettings.asset’. So what happens then is that my project settings, icons, versioning, platform, target api, keystores, etc. are overwritten with blank values. You get one failure in loading, then it’s all overwritten and destroyed. Restarting the editor does not report the error, because it overwrote the missing info. That’s a pretty serious bug, just wondered if anyone else has encountered this.

This happened to me once before on this version and I accidentally published a version without icons. It’s very time consuming to rebuild everything that was lost. It happens when I change networks.

EDIT: I wonder if this is a OneDrive issue. Windows forces you to use it and if you can’t connect your computer must assume the file is gone.

1 Like

If you backup with OneDrive, I suggest change to git. Github Desktop is the most easy git gui to learn.

In addition to this, Git is one of the version control systems that allows you to save every change in your project, saving the history.

E.g., I use Bitbucket + Sourcetree + Git, for example.

Also, people use GitHub + GitHub Desktop + Git as mentioned above or Unity Version Control.

I do need to learn Git. I don’t know why I find version control so intimidating.

1 Like

If you work alone, it’s easier than you think.

Some recommendations before start:

  1. Place this file in the root folder of the project to ignore unneeded files (that can be generated by other files) and save the space: gitignore/Unity.gitignore at main · github/gitignore · GitHub
  2. Set Asset Serialization mode to “Force Text” to see differences in files:

  1. Choose a CVS provider, learn its instructions and make your first commit.
1 Like

I wonder if there are files that I do NOT want to ignore, that I don’t even know about in Unity, that maybe I want backed up. Project Settings is something I thought was handled, but I guess for anything where I choose options should be maintained by version control.

Anything else besides ProjectSettings.asset?

EDIT: Wow thanks for that file. That should save a lot of work.

Yikes, I think I have git setup correctly, but my initial efforts utterly deleted the content of some of my files. For instance some of my prefab files are now empty for some reason. I can’t imagine why that would happen just from using git.

LFS is a real complication for unity. If you don’t know about it when you first commit it taints your repository.