Search Unity

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

Simultaneous editig a scene

Discussion in 'Unity Collaborate' started by Cascho01, Mar 2, 2017.

  1. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    When I edit a scene and a co-worker is simultaneously working on the same scene based on the new Collab feature.:
    How can we merge both changes without losing the changes of one side?
     
  2. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @Cascho01! Collab is able to auto-merge modified scenes as long as no component changes conflict with each other. An example being if one user modified the Rotation of a game object's Transform component and another user modified the Scale of that same game object's Transform, these changes will conflict since they affect the same component. But if one user edited Rotation in a game object's Transform while another user modified the Mesh Renderer or a different component, then these changes will auto-merge!

    If there is a conflict, though, then you can use a supported merge/diff tool (WinMerge, FileMerge, P4Merge) to manually merge the changes. After the merge tool is installed and selected in Unity's Preferences->External Tools, simply hover over the conflicting scene in the Collab Toolbar, select External Diff, then pick which changes you want for each conflict.

    Hope this explanation helps. Let me know if you have any more questions!
     
  3. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    Top, thanks!
    Could you recommend one of the diff tools (I used Tortoise SVN so far which isn´t supported)?
     
  4. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    No problem! I've had good results using SourceGear DiffMerge. It really just depends on your preference. We are looking into adding support for Tortoise SVN's merge tool in the near future.
     
  5. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    Nice!
     
  6. JohnRossitter

    JohnRossitter

    Joined:
    Dec 18, 2013
    Posts:
    1,027
    This is good to know.
    I thought that when there was a difference in the scene file at all, it would just complain and make you pick one or the other. Its still far from ideal as merging a 25 meg scene file manually is just out of the question.
     
  7. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    @ryanc-unity

    I place new objects in a scene while a coworker commits any other changes to that scene.
    I "UpdateNow" and load the changed scene, and voilà - my new objects are lost: No auto-merging! :-(
     
    Last edited: Mar 8, 2017
  8. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    @JohnRossitter

    You're right, it isn't ideal. We have plans to add visual merging in the future.
     
  9. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    @Cascho01

    Sorry, you'll need to make sure that you save your scene before you pull your teammate's changes if you intend to keep your own changes too. We don't auto-save scenes when you open the Collab Toolbar so that users can make changes to a scene that they don't intend to keep, like testing how a new asset looks in a level or tweaking some character movement values, etc.
     
  10. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    Sorry no, that seems not to be true.
    Even when I save before updating, recently added objects get lost.
     
  11. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Really? That's very surprising. Can you go into more detail about what type of objects you're adding on your end and what kinds of changes your teammate is making? When you pull your teammate's changes are there merge conflicts at all or do you just see the message asking you to reload your scene because external changes have been made?
     
  12. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    I get asked to reload my scene and so I do then.
     
  13. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    That's definitely odd. Is your project smaller than 2GB. If so, then could you send us a bug report using that project so that we can take a closer look at it and find out why it isn't auto-merging like it should? You can file a bug by opening the project then going to Help->Report a bug.