Skip to content

wiztigers/unitytuts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unitytuts is just a repository for me to learn about Unity and how to setup a clean build pipeline for Unity projects.

Roll-a-Ball tutorial

unitytuts?branch=master&env=project=%22Roll%20a%20Ball%22%20target=%22Linux%22&label=linux unitytuts?branch=master&env=project=%22Roll%20a%20Ball%22%20target=%22Mac%22&label=osx unitytuts?branch=master&env=project=%22Roll%20a%20Ball%22%20target=%22Windows%22&label=windows

  • 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:

    • one should commit .meta files: this is recommended by Unity. Here is an explanation.
      TL;DR: scenes reference .meta files identifiers, so forgetting them breaks scenes.

    • V$ .sln and .csproj files, as long as Library, obj and Temp folders are generated by Unity on build (source).

  • 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 or git-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, choose Visible Meta Files

      • In Asset Serialization section, choose Force 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:

    1. install unity and the required modules, then

    2. build for its specific target platform, and finally

    3. archive the produced binaries so they can be delivered for a release (ie. git tag)

Tanks! tutorial

unitytuts?branch=master&env=project=%22Tanks!%22%20target=%22Linux%22&label=linux unitytuts?branch=master&env=project=%22Tanks!%22%20target=%22Mac%22&label=osx unitytuts?branch=master&env=project=%22Tanks!%22%20target=%22Windows%22&label=windows