Unity 3D is a powerful engine but can get hard to maintain on your local machine. ( A small game can easily run into a gb or more of data ) . The best solution would be to check it into a revision system. yay ! Simple !! ( Bazinga !! , no it aint simple ) .
The whole of Unity project is made of lot of binary files and we all know while we can checkin the files into git ( yes thats what I love to use ) , it can get nearly impossible to diff between 2 revisions. So what do we do now ?
Welcome the .meta files
Meta files convert or rather keep all the important data related to your prefabs, scenes etc in the form of text files. This helps the process of maintaining it on git easy ( easy to diff , see the idea ? ) .
Some changes to your projects needed.
Go to Edit -> Project Settings -> Editor , launches Editor Settings dialog and make changes as shown.
- free unlimited repo’s ( both private and public )
- Supports git and mercurial ( like git )
- SourceTree application maintained by bitbucket that provides a visual tool for git ( aah the bliss )
- Free for upto 5 members ( have a bigger team ? easy to upgrade )
- Has a wiki and bug tracker part of repo ( wow ! )
- Get checkin mails
- Use it to create builds on Unity Cloud
Some roadblocks before doing a first commit !!
Though we have a repo and meta file issues sorted out , the biggest concern is the gazillion files that Unity generates for your project. They are need only to make your project work faster ( the Library folder for example with its huuuuuge cache ). We don’t wanna check that in do we ?
.ignore file to the rescue. git allows the creation of a file called ( .ignore ) which allows one to mention what should not go into a project.
Checkin this file and you are all set. You now have a lean mean project folder that gets checked in to git.