11

I just updated my Unity from 2017.3.1f1 to 2018.2.1f1 and when I opened my project it moved the manifest.json file from the UnityPackageManager folder to the Packages folder. Also, it created a bunch of files and folders in the Packages folder.

My question is:

Is it safe to ignore the Packages folder from the repository, especially manifest.json?

Thanks.

Hadi Fooladi Talari
  • 1,098
  • 1
  • 13
  • 32

2 Answers2

14

manifest.json contains list of your dependencies(the packages you have used for your project). so if You clone your repository on a different machine, unity uses this list to download the required packages.

short answer: You should not put Packages in your .gitignore. It should be committed along with the rest of your project files.

Andy Baker
  • 20,429
  • 11
  • 56
  • 71
Amin Aliari
  • 474
  • 7
  • 11
  • 2
    just to clarify. then is it fine to **add packages folder into gitignore** with an **exception** for **manifest.json** ? **edit** i am confused with new packages folder that show up in unity editor containing multiple file that i didnt knoew – asem bused Mar 19 '19 at 07:11
4

Not a lot of google results for this, so for future searchers I will add:

It seems in Unity 2020.1 (and probably earlier) that the actual package contents are held in Library/PackageCache, and only the manifest file lives in the root Packages folder.

If Library is ignored as it should be, then there is no additional entry needed in the .gitignore.

arichards
  • 293
  • 1
  • 9