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.
However, it is always safe to delete the Library folder (while the project is not open in Unity) as all its data is generated from what is stored in the Assets and ProjectSettings folders. This also means that the Library folder should not be included in version control.
Packages are collections of files and data from Unity projects, or elements of projects, which are compressed and stored in one file, similar to Zip files.
Use the Unity Package Manager (in Unity's top menu: Window > Package Manager) to view which packages are available for installation or already installed in your Project. In addition, you can use this window to see which versions are available, and install, remove, disable, or update packages for each Project.
The Assets and Project Settings folders are your project and are all you need to backup/put on SVN,etc. You can delete anything else. The Library folder will be recreated when you next open the project.
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.
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With