Monday 7 April 2014

Working in Team Basics. Unity and Git.


If you are an small development studio and decide go for Unity, you will not regret. Although, there are some things you would like to know before continuing. In Mofables we migrated from Cocos2D to Unity four months ago. It was at the time I joined the company, so it was in my hands to decide the road map.

Like always, I will be talking mainly about free or cheap solutions. Everyone knows that you can buy a team licence from Unity Technologies that will help your greatly to share your work and keep it safe. There are many solutions like that, but are very expensive and definitive "no" for people witch is just starting and can't really take advantage of them.

The first thing you need to do to get things up and running is setting up a collaborative environment. Depending on the size and competencies or your team this can be easier or harder. To simplify the things, let's imagine your team is composed of 4 people. You may be interested in Agile Methodologies such as SCRUM or Kanban, I recommend Trello for tracking and planning.

Trello is free and very versatile. There is a plug in to support Scrum for your browser.

You can use pretty much any kind of repository, but I really recommend Git. Git is fully distributed, witch means that everyone's work will be independent and faster. Also there are plenty of web pages like Bitbucket, where you can get your projects hosted privately, for free and without limits. Also the use of some client like SmartGit will allow everyone in the team to collaborate without knowing how repositories really work.


The difficulty of installing git depends on your Operative System, but all of the tools mentioned above are available in Windows and MacOS. Once git is ready, not every member in the team has to really use it. For example, the artist can provide the Assets via a different channel, like Dropbox.

There is a couple of things to know about how Unity works to not get confused with git. First you need to know that most of the files and folders in your Unity project are created by the program automatically. The only folders that need to be shared and stored in git are always "Assets" and "Build Settings". No more. Ignoring the other folders is done via the ".gitignore". Also, be careful and don't push your builds to the repository! They use a lot of space and should not be versioned.

Unity and git work quite well together. Perfect combination for Indie developers.


In order to work in an agile way while developing in Unity, you should mostly avoid the team members to be blocked by another. This is not a problem with code, because git will automatically manage and merge the scripts. By the way, if you are wondering witch scripting language to use, go for C# 100%. Even if your programmers come from JavaScript.

As you may already know, all the Unity projects are divided in Scenes. Every scene is a file that tells the game engine how to "create" the game from your assets. The scenes can be stored as text, but should not, under any circumstance be merged! During the development of the game, the scene should be in the hands of one and only one person at a time.

How to solve the problem of the inability to share the development of the scene? The rest of your team members can still collaborate building the prefabs and scripts. If you keep the different components of your game as prefabs, people can modify those components in a different scene and the changes will globally affect the game.


"The path is made by walking" - Spanish proverb.

In conclusion, there is a lot to say about working in team in Unity. When I was starting I used to read a lot of tips, guides and blogs. But the truth is that it is very difficult to understand the value of those teachings until you solve your own problems by yourself

Good luck :)


9 comments:

  1. Very helpful post.. I am about to start a big internship this summer and this post gives me insightful tips to prepare for that :D

    ReplyDelete
  2. Wow! Is an excellent post!
    I have to change Javascript for C# and start learning to use git.
    I think i will read this post a lot of times.

    ReplyDelete
    Replies
    1. You will find a lot of C# tutorials in the official site: https://unity3d.com/learn/tutorials/modules

      Thanks! ^^

      Delete
  3. Hello, can I ask you why I should learn c# instead of javasript? As I am learning javascript for use in my unity game right now. Thank you

    ReplyDelete
    Replies
    1. C# is becoming the standard for Unity development and anyone that will have to create a complex project in Unity and mantain the code for a long time will choose C# as it provides "better" code.

      Of course many people can argue about that since better is something relative. But it is still prefered more and more by the mayority of developers. Moreover, Unity stated that the main language for their tutorials, codereference and Unity manual will be Unity.

      PS: It is also very similar to Java and makes it easier to learn for people that comes from that language (like me)

      Keep it up! :)

      Delete
    2. Thank you! I understand.

      Delete