2

According to the Unity tutorial, the only folders that should be in version control are Assets and ProjectSettings. The rest of the assets and files that make a project are supposed to be generated by Unity. As a test I tried to open a project directory that only contained these folders. It loaded the project, it just would not run because some dependencies were missing.

https://unity3d.com/learn/tutorials/topics/production/mastering-unity-project-folder-structure-version-control-systems

It seems that critical assets imported from the Asset Store are not contained in either of these folders, nor are they automatically generated when a project is opened, they must be installed/imported manually the first time. My goal with my version control is to be able to do a fresh pull from git and be able to run the project off the bat.

The missing assets seem to be located in /Library/PackageCache/. Copying the folder to the test environment doesn't work, as this folder is cleared the first time Unity is run. What files do I need to keep to make this work?

1
  • 1
    I always use Github's oficial Unity .gitignore as a guide and never had any trouble so far... And use visible meta files instead of hidden .. it seems that your tutorial is a bit outdated as it states it is for Unity 4.3. if you are using stuff from the PackageManager in my experience so far I had to reimport the ones I needed anyway ...
    – derHugo
    Commented Mar 28, 2019 at 17:06

1 Answer 1

1

According to the Unity manual, you only need to include 3 folders into your version control system:

"When checking the project into a version control system, you should add the Assets, Packages and the ProjectSettings directories to the system."

The easiest way of setting up version control for Unity it to use Unity's own version control called Plastic SCM. It has two modes: Programmer mode and artist mode. I recommend Artist mode (Called Plastic Gluon) for ease of use especially if you are the only person working on the project. In both modes, Plastic SCM will automatically includes what is necessary and exclude the unnecessary files.

Not the answer you're looking for? Browse other questions tagged or ask your own question.