unitytuts
is just a repository for me to learn about Unity and how to setup a clean build pipeline for Unity projects.
-
Only commit the bare minimum number of files for Unity to recognize a folder as a Unity project. Use gitignore.io to have an idea of what shouldn’t be commited (YMMV). In particular:
-
Unity uses a lot of binary files.
-
As many of these live and may change during development, and as git doesn’t properly manage binaries in its diffs, precommit/prepull hooks should be used in conjunction with something like
git-lfs
,git-annex
orgit-fat
as long as a separate repository for binaries (directions). -
To be more scm-friendly to boot, one can however easily force text format instead of binary format on Unity. I’m unsure about the impact on performance ; however, from a workflow point of view (be it considering a team of one or of many), versioning binary files does not provide a single reasonable advantage. The following parameters should be set at the start of each new Unity project.
In Unity:Edit
>Project Settings
>Editor
-
In
Version Control
section, chooseVisible Meta Files
-
In
Asset Serialization
section, chooseForce Text
-
-
-
Recent Unity versions have a basic core installer as long as many additional target modules installers. These additional modules must be installed to be able to build for a specific target platform. See install.sh for additional information.
-
A nice continuous integration system should be able to run concurrent build jobs, one for each target platform. This is done by the current project, using travis-ci's build matrix feature as long as badge-matrix, which is used to display per-job/per-platform badges instead of just the one badge made available by travis-ci for general build status.
Each job does:-
install unity and the required modules, then
-
build for its specific target platform, and finally
-
archive the produced binaries so they can be delivered for a release (ie. git tag)
-