Home > Blockchain >  Unity, .pdb and .dll files gets deleted when opening project for the first time
Unity, .pdb and .dll files gets deleted when opening project for the first time

Time:02-20

After clonning a unity project from a repository, I tried to open it with Unity Hub and it automatically suggested version 2021.9.f1 and I installed that version.

But once it tried to open, it asked me to enter safe mode because it wasn't able to find many stuff in scripts such as UnityEngine.UI, Text etc.

I tried many things but lastly in safe mode i tried "git status" to see if there was anything missing and nearly everything inside Library/ScriptAssemblies folder is deleted when i try to open the project.

I am lost at this point and I have no clue why Unity deleting .dlls and .pdb files inside ScriptAssemblies folder.

I will appreciate any insight on this problem and solution or work around suggestions are welcome.

Note: I don't know if it would be related but person who created the repository was using vscode. I am using visual studio together with Unity.

CodePudding user response:

The Library folder (among others) should never have been included in source control in the first place. Everything in there is constantly being changed and recreated by Unity, based on the contents of your Assets and Packages folders, and the target platform of your project.
An example .gitignore file for Unity project folders is here: https://github.com/github/gitignore/blob/main/Unity.gitignore

  • Related