Also see: Git Repositories for Unity Projects
Some of these tips are very generic and apply to any code collab project, but they're worth repeating to prevent you some headaches.
- Use the same Unity (sub)version. Switching to a different version is often possible without issues, but if you're working on different versions, you'll have to convert the project each time which is rather time consuming (and could also cause incompatibility issues from time to time).
- Merge often. The more differences there are between two versions, the more likely you're going to run into compatibility issues and/or merge conflicts that can be time-consuming to resolve.
- Use version control. Ideally a git based solution. When you do use git for Unity projects, include the Unity .gitignore, as Unity projects contain a lot of extra files that don't need to be included in the repo, and so excluding them saves a lot of data.
- Work with prefabs and packages where you can. In general having work "containerized" into Unity packages or prefabs makes them easier to transfer to other projects and scenes. This helps to keep your project maintainable.
Unity Teams, also sometimes referred to as collaborate. Important to note is that this is a pro-feature, but as pro license is free for students/educators, this shouldn't be too much of an issue.
Some links to get started:
This doesn't seem to be used too often (judging by the lack of forum/youtube posts about it etc). Nonetheless, it has some advantages over the (more used) git version control pipeline:
- Scene merging. If two people are working on a scene, merging changes made by someone else will keep the current changes and just apply the changes made to the scene in the latest commit. This doesn't really work that well when working with git.
- Processing merge conflicts. In the case that you try to push a new versions of a file, while that file has changed in the meantime, you get a merge conflict. The newest version of Unity collaborate (using PlasticSCM) has a really intuitive interface to process merge conflicts, such that you don't need to worry as much about this.
- Ease-of-use. You don't need to be familiar with all the git-mumbojumbo to be able to use Unity Teams. It integrates fully with Unity, and you can use and do everything from within the editor.
Since 2020, this is also integrated within Unity, but will require a little more knowledge and set-up to use. However, this is defenitely worth it when working on larger projects or with larger teams.
Advantages over Unity Teams:
- Free. Doesn't require Unity pro.
- Branches. You can create different branches to test your features independently. You can use a master branch to make sure you always keep a working version ready while working on the development branch to develop new features. This brings your version control game to a new level of flexibility and control.
- The newest version of Unity Collaborate (using PlasticSCM) also has branches built in.
- Issue Tracking. There are other ways to track issues (for example Asana, ClickUp, Notion, etc.), but having this feature embedded in the source control pipeline is incredibly helpful. For example you can tie issues with feature branches, having them autocomplete after a completed pull request.
- Future Proof. As your project grows, you might want to expand your DevOps practices for example with the use of Automated Test Plans or Artefacts. Git is often the default in these pipelines and will likely be easier to integrate with the rest of the pipeline.
- Transferrable skill. Knowing how to use git, is going to come in handy in the future for other non-unity coding projects.
For a guide on how to set this up, see Git Repositories for Unity.