Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it safe to ignore the 'Packages' folder in Unity 2018?

Tags:

unity3d

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.

like image 935
Hadi Fooladi Talari Avatar asked Jul 30 '18 16:07

Hadi Fooladi Talari


People also ask

What folders are safe to delete Unity?

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.

What are packages in Unity?

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.

What do we use the Unity Package Manager for?

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.

Is it safe to delete unity3d file?

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.


2 Answers

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.

like image 138
Amin Aliari Avatar answered Sep 17 '22 20:09

Amin Aliari


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.

like image 29
arichards Avatar answered Sep 17 '22 20:09

arichards