Search Unity

Unity's version control component has been upgraded to Plastic SCM.

Noob question with using collab with a team

Discussion in 'Unity Collaborate' started by pyroorb, Apr 10, 2017.

  1. pyroorb

    pyroorb

    Joined:
    Mar 24, 2017
    Posts:
    3
    So, my team as been learning Unity to do better things with VR. We all have a edit/motion graphics background. For the most part we have picked this up relatively easily with the need to code. My question is with collab is there any workaround where we can all work in the project, and be able to merge the changes without having to manually go through the code?

    I've been looking around and it seems there isn't. We though maybe it would be easy if someone was working on lighting and someone was working on interactions, but that hasn't been the case..

    Like I said, I'm new to Unity and looked, but wanted to double check that I didn't miss something and there is an easy way to do this.

    Thanks
     
  2. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @pyroorb! I'm happy to hear that your team has started learning Unity! When it comes to merging code changes, there are limits to what can be done automatically. If you and a teammate edit different lines of code in the same file then your changes have a good chance of being auto-merged. But if you both touched the same lines of code, then a conflict will pop up that will need to be resolved.

    With Collab, you do have the option of either picking your whole file, your teammate's file, or launching an external merge tool to pick which lines of code you want to keep. There are free tools that let you do this, such as DiffMerge, (Mac's come with File Merge already installed).

    So to answer your question, yes, Collab can auto-merge your changes if they don't overlap. But if they do, then there is no software out there smarter than you when it comes to picking whose changes to keep. I hope that answers your question and best of luck in whatever you team decides to make!
     
  3. pyroorb

    pyroorb

    Joined:
    Mar 24, 2017
    Posts:
    3
    Ryanc thanks for the reply. In terms of Collab being able to auto merge, maybe we've gotten the scene set up wrong then, or is it meant more to have multiple people in different scenes so nothing overlaps?

    We've broken up several tasks to train on. Someone is working on lighting, and someone is working on some object interactions inside of a scene. We thought if we weren't touching the same specific objects we would be fine, but. whenever anyone makes to change to anything it updates the scene file, which is clearly overlapping and then we're in the keep mine/keep theirs position.. We want to keep lighting changes from 1 person, and interactions from another. Is the only way to achieve this to go through the code changes, and individually select to keep theirs or keep mine?

    I don't know if this is simply a limitation of my knowledge of Unity, coding, or both, but we assumed there would be an easy way to merge if we weren't touching the same objects (we tested just with only changing materials on two different objects, but again it updates the scene file we're in the same situation)
     
  4. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Ah so you're talking about scene files. Unfortunately, that's a bit more complicated than merging scripts or other types of assets. It's good Unity practice to limit scene changes to come from one user on a team at a time to reduce the chance for conflicts. The Collaborate Team is looking into ways of making it easier for users to merge conflicting scene changes, which has been a big pain point for Unity users since the very beginning.

    I'm a little confused by what you said you're experiencing. What should happen is that Collab will auto-resolve scene edits so long as no two components of the same object were touched by both users. Now plugins and shaders that modify objects every time the scene is played can confuse Collab's merge tool, since to Collab it looks like both objects have different changes to the same object. There's sadly no way around those types of conflicts outside of using a manual merge tool.

    However, what you tested with just changing the materials on different game objects should still auto-merge fine. Does Collab list the scene as a conflict when you try to pull your teammate's scene changes after saving your own changes? Can you replicate that with a small sample scene?