Reputation: 1978
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.
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?
Upvotes: 2
Views: 2274
Reputation: 8466
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.
Upvotes: 1