Unity Collaborate: Finally, a VCS Made for Unity

814 VIEWS

·

A couple of teammates and I were making a game for Udacity’s VR Jam last February. We had been putting off merging our hard work because of the dreaded merge conflicts that were ahead of us — merging Unity scenes.

What’s so bad about merging, you ask? Let me explain—and let me then offer a solution.

The Travails of Merging Unity Scenes

Unity scene files contain so much information that it’s hard (and often impossible) to merge. We started out using git, which works fine for scripts. However, it falls very short (and gives up) when trying to merge scenes. I was off to research. Some googling took me to Unity’s documentation for Smart Merge as well as a couple of other posts about Perforce and PlasticSCM. Both sounded good, until I got to the costs. I kept looking, sure that there’d be something that would work.

I stumbled across a plugin, UniMerge. At $15, I thought it was worth a try. Reading through their documentation, they expected that we’d have two copies of an object in the scene, or two copies of the same scene. It would show the differences, which is great, but I didn’t have two copies. I could have just made a copy of everything and then renamed it. Pulling in another feature branch would ideally not create merge conflicts, and I could have two copies (of EVERYTHING) in the project. Then, I’d be faced with the daunting task of going through every object and scene, comparing and then deleting. Way too tedious. There had to be a better way.

Solution: Unity Collaborate

I finally reached out to various places — the Udacity Slack channel, even a Unity Facebook group I’m in. Many offered suggestions. Some just posted the same research that I’d come across. (I can do my own googling, thank you.) Someone mentioned Unity Collaborate which is in beta right now. A service made by Unity for the exact purpose I needed? Yes, please!

Setting it up was easy. Using Unity 5.5.0 or later, here’s a link that will help you. https://developer.cloud.unity3d.com/collaborate/ I had to download Unity version 5.5.0×1. (NOTE: Without this version, the other steps will look like they work, but you won’t actually be able to publish anything.) After you’ve installed the correct Unity version, go to your Services tab within Unity. Click on Collaborate and turn it on.

Once you’ve turned it on, you’ll see a “Collab” dropdown in the top bar. That’s what you’ll use to sync or publish, view your history, or invite collaborators.

Add or change anything in the project, and the icon next to Collab will change to a blue arrow, indicating you have made changes. Click on “Collab” and you’ll see a publishing dropdown. Fill in your commit message. And click “Publish now.”

You can see what changes you’ve made to a single file…

Or you can revert your changes to a single file.

At the bottom, you can invite teammates and set permission levels by adding their email…

Or view your history.


I think this very well may be my new favorite feature in Unity! It’s amazingly easy to setup and use. The downside is that now my GitHub profile shows a lack of commits. Maybe Unity will set up some integration for that too!

Do you think you can beat this Sweet post?

If so, you may have what it takes to become a Sweetcode contributor... Learn More.

Kristin is a freelance developer living in the San Francisco Bay Area. Her development background includes a mix of LAMP stack web development, Java and Android development, as well as Unity C# development. She is currently working on the Virtual Reality Developer Nanodegree from Udacity.


Discussion

  • I highly recommend using any version more recent than 5.5 if possible, and would discourage using the preview build as described. Many bug fixes have been made since then and some nice new features have come out since.

    For example, 5.6 let’s you publish a previous commit as the new latest commit in case you need to undo work from a borked state.

    In the 2017.1 Beta, you now have project browser filters for modified files which you can select and right click to do a partial publish, as well as the ability to see what assets are being currently worked on by other users on the same project.

    Gurg 05/31/2017 11:17 am Reply
  • Hey! Author of UniMerge here. It’s only recently come to my attention that the tool is totally broken in 5.6, and possibly in 5.5. I’m working on a fix, and will let you know when I have one!

    Matt Schoen 06/01/2017 11:25 am Reply
  • Hi,
    I am still in the research phase and was going to test both Unity Collaborate as well as the GitHub for Unity extension available from https://unity.github.com/
    Do you have any comments on that? Is Collaborate better?
    Thanks!

    Matthis Thorade 06/02/2017 2:33 am Reply
  • Hi,
    I am still in the research phase and was going to try Unity Collaborate as well as the GitHub for Unity extension available from https://unity.github.com/
    Do you have any comments on that? Is Collaborate better?
    Thanks!

    Matthis Thorade 06/02/2017 2:35 am Reply
Click on a tab to select how you'd like to leave your comment

Leave a Comment

Your email address will not be published. Required fields are marked *