Search Unity

Scene Merging

Discussion in 'Unity Collaborate' started by JohnRossitter, Jan 31, 2017.

  1. JohnRossitter

    JohnRossitter

    Joined:
    Dec 18, 2013
    Posts:
    1,027
    Why does this not work?

    I work on a scene and a team member works on a scene.
    Its silly that we have to take turns, why does scene merging not work in Collaborate?
    Accept mine? Useless, I dont get their changes
    Accept Theirs? Useless, I lose my changes.
    Launch external tool? Useless as there are no merging markers in the file
    Manually launch the UnityYamlTool? Seriously, has anyone ever used this?

    Collaborate is great for handling script changes, but come on, Unity is about Scenes and assets.
    Can you all please do something about this massive plot hole in Collaborate?
     
    Last edited: Jan 31, 2017
    ricarious and ModLunar like this.
  2. JohnRossitter

    JohnRossitter

    Joined:
    Dec 18, 2013
    Posts:
    1,027
    Don't everyone jump on this at once now...
     
    THHamiltonSmith likes this.
  3. ryanc-unity

    ryanc-unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,143
    Hi John!

    We know that merging scenes is still a hassle, especially for those really large, complicated scenes. That's why we are looking into merge tools that can help alleviate that stress point. We hope to have more info on this in the coming months.
     
  4. JohnRossitter

    JohnRossitter

    Joined:
    Dec 18, 2013
    Posts:
    1,027
    Slow Clap.....
     
    ModLunar and jrumps like this.
  5. Genesis4545

    Genesis4545

    Joined:
    Jan 31, 2017
    Posts:
    7
    What exactly do you mean by "Scene Merging"? Is your point that collab doesn't have an internal merging tool or is there some problem with merging scenes specifically? I'm confused since in their tutorial they say that you have to solve merging conflicts with an external tool, which I'm fine with, but that would imply that there's no issue with merging if you're willing to use an external tool, right?

    I'm just trying to clarify things about collab since I really would rather not use github =P
     
  6. JohnRossitter

    JohnRossitter

    Joined:
    Dec 18, 2013
    Posts:
    1,027
    Specifically I mean that I have a many scenes that are upwards of 30 megs in size, not tiny but not really that big.
    If someone one else on my team want to work on the scene and moves somethings around, the next time I get the code, there is a merge conflict.

    1) problem is that there is no head data in the files, so doing a merge is just about impossible even with merging tools
    2) who is their right mind has the time to manually manage a 30 meg file merge, every time there is a change?

    Collaborate does not merge (automatically) Scenes or prefabs because for whatever reason it can't deal with YAML files.
    Granted it can merge binary files just fine.

    Using a git client is sometimes easier, but I have a bunch of artist an my team and I just wont subject them to that.

    My point is, that this should have been issue number one for Collaborate.
    I dont see how it has gone so for so long with not being addressed.
    If they could fix this, it would completely make using Collaborate 100% worth the effort.
     
    ricarious likes this.
  7. Genesis4545

    Genesis4545

    Joined:
    Jan 31, 2017
    Posts:
    7
    I see. Thank you very much for clarifying ^^ I agree that this should've been adressed much sooner, from the get-go would've been nice =P
     
  8. DevinW

    DevinW

    Joined:
    Jun 19, 2014
    Posts:
    19
    This isn't a Collaborate issue - this is a problem across all types of version control.

    And Unity has already publicly stated that it's in their roadmap for collab. You're welcome to read over https://docs.unity3d.com/Manual/SmartMerge.html

    Not being able to merge scene has been apart of Unity development for a long time and studios have found many work arounds. When my studio was working with Unity Asset Server we used Trello for scene checkouts so the team knew who was working on what scenes.

    At first this seems really inefficient but in reality once you start working with it you realize you hardly ever actually need to commit a scene. Most of us on the team work with prefabs exclusively and only the need scene for a few seconds at a time to maybe add those prefabs if they are not already there. We use prefab spawners as a solution around nested prefabs as well.

    Hope this helps, but here's a slow clap for you're inability to do research /slow clap...

    Edit: It also makes me laugh when I see people post their problems and state that their issue needs to be priority #1 before doing their homework, it's like you're rubbing someone's nose in a problem while seeking to be the center of the world instead of simply leaving a humble request.
     
    Last edited: Feb 9, 2017
  9. JohnRossitter

    JohnRossitter

    Joined:
    Dec 18, 2013
    Posts:
    1,027
    I did plenty of research.
    It's a huge pain in the butt...always has been.
    But it's a massive hole in collaborate, a source control system by unity for unity, for a company that quote solves the hard problems, it's a massive black eye that they can't figure out a way to merge the scene structure they created.

    Still slow clapping
     
    ModLunar, jrumps and Tieco like this.
  10. DevinW

    DevinW

    Joined:
    Jun 19, 2014
    Posts:
    19
    Also in related new the latest build preview has offered a elegant solution to the ugly trello card scene checkout system I mentioned before.

    " "In Progress" Soft Locks
    Last but not least on the list, you can now see when teammates are making changes locally to a scene or a prefab. In the Assets window, you'll be able to see an indicator when changes are in progress by someone else, helping to avoid conflicts. "

    https://forum.unity3d.com/threads/c...d-available-now-exciting-new-features.443913/
     
    ryanc-unity likes this.
  11. mowax74

    mowax74

    Joined:
    Mar 3, 2015
    Posts:
    30
    @John Rossitter: I'm with you: still slow clapping.
    And a slow clap as well for DevinWs explanation.

    We talking about merging scenes, not locking scenes. That's a cheap attempt to get around the lacking feature of proper scene merging.
    Unity claims to be the number one game engine. What, if you have a team of at least 50, with different sub teams, that work on different branches on different features - parallel - not sequentially. Testing stuff, and later, everything needs to come back to the main development branch. In that situations its completely normal, that you have different versions of your scene(s). As normal, as having different versions of your code files, with the difference, that you can easyly merge the script files.
    but it's a pain, if not impossible, to get everything together in the unity scenes.
    Locking works, if you develop one feature after an other, with a maximum count of 5 developers.

    There was a nice little asset called uni merge for unity. It did kind of a good job merging the scenes. but its not working anymore in unity 2017.1.
    Because unity would not be unity, if they wouldn't change things under the hood undocumented all the time, that brings everything to not work anymore, and leaves developer back, testing around why everything is not working anymore, instead of having a documented list of changes.
     
    Tieco likes this.
  12. Rich_A

    Rich_A

    Joined:
    Nov 22, 2016
    Posts:
    154
    So, its been a year now, do we have it?
     
    ModLunar likes this.
  13. Bzarka

    Bzarka

    Joined:
    Apr 9, 2018
    Posts:
    1
    Sorry to be a buzzkill but we're in the same boat so probably no unity still don't have it. Right now we're just trying our best to merge scene and fix our scripts and etc
     
    ModLunar likes this.
  14. Stankiem

    Stankiem

    Joined:
    Dec 4, 2013
    Posts:
    114
    Unfortunately our team is gonna ditch collab, we were hoping this would fix our scene merge issues but still having the same problems as other more powerful version control solutions. This really needs to be fixed for all types of version control. It's been our biggest headache since we started using Unity.
     
    ModLunar likes this.
  15. acr1378

    acr1378

    Joined:
    Dec 4, 2014
    Posts:
    58
    @ryanc-unity It's been almost two years now. What is the status on scene merges with collaborate? We have been having a ton of problems with collaborate, and they seem to stem mostly from the scenes not merging properly. It's been bad enough that we may switch to GitHub.
     
    ModLunar and Marc-Saubion like this.
  16. Marc-Saubion

    Marc-Saubion

    Joined:
    Jul 6, 2011
    Posts:
    276
    @acr1378 , switch to github.

    None of the collaborate features anounced in the last two years have been released and new bugs preventing us to use that service won't be fixed for months.
     
    jrumps and Rich_A like this.
  17. ryanc-unity

    ryanc-unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,143
    Hi @acr1378! Apologies for the delayed response. Every QA in Unity just came back from a Quality Week where we could share our knowledge, talk to customers and get a better perspective on the current quality of Unity and how to start improving it. (FYI we know there are a lot of issues and we're all working hard to deal with them as quickly as possible). Thank you for your patience.

    We know that scene merging is a hotly requested feature, one that all source control options struggle with. We have been looking into drastically overhauling how merging is handled on the backend so that it'll be easier to use, more consistent with its results and easier to debug when something goes wrong. We can't give an exact ETA on this feature yet but it is something that we want to bring to everyone using Collab.

    An established workaround for many teams using Unity has been to specify a master version of scenes, making copies of them to work in (either as separate scene files or as branches in whichever VCS they're using) and ensuring that changes are only merged in by one user at a time, using task trackers to specify who your merge master will be at any given time. This helps to reduce the bottleneck that can come up from merge conflicts and helps to minimize non-reviewed changes from getting into master. It's one that I've used in previous projects to great effect.
     
  18. Omzy

    Omzy

    Joined:
    Jun 28, 2013
    Posts:
    31
    I think in the interim that soft locks or even hard locks (which could be dismissed by the team admin) would be a good temporary solution. This doesn't fix the productivity losses from not being able to work on scenes at the same time, but would at least ensure that conflicts don't happen in the first place.
     
    ryanc-unity likes this.
  19. StaceyH

    StaceyH

    Unity Technologies

    Joined:
    Apr 11, 2018
    Posts:
    42
    @Omzy: Collaborate supports soft locks today, though it is referred to as In-Progress edit notifications within the manual. You can read more here.

    As @ryanc-unity mentions, the concept of merging scenes is not something that is Collaborate specific - this is a problem seen by all version control solutions. While on the surface, merging asset files might sound like a simple problem, it is actually incredibly complex to do correctly. We (Unity) are aware that it needs to be solved to help teams of all sizes work better together, and we have begun looking at ways to do so. Due to the complexities of it, we do not have an ETA or anything to share just yet
     
    Last edited: Feb 27, 2019
  20. Omzy

    Omzy

    Joined:
    Jun 28, 2013
    Posts:
    31
    I would think that if you ever intend to allow scene merging, you might as well go all the way and turn it into its own full feature for concurrent scene editing, like what you can do in HeroEngine. Multiple artists can join a scene session and edit it together, immediately seeing changes from the other person in real-time.
     
  21. JoshuaWhittaker

    JoshuaWhittaker

    Joined:
    Apr 9, 2018
    Posts:
    1
  22. Doronn

    Doronn

    Joined:
    Sep 17, 2018
    Posts:
    5
    Although sounds nice, it's actually a really bad idea in most cases.
    It may be fine between artists, but for development, the consistency of a scene is crucial.
    But a clean way to merge scene would surely be great.
     
  23. DanVioletSagmiller

    DanVioletSagmiller

    Joined:
    Aug 26, 2010
    Posts:
    117
    To share some of the complexities Unity faces with scene merging, Think of this scenario.
    A scene has 1 object(A), with a child object(B). (B) has a script. There is also a second root object(C).
    with a structure like this:
    ObjA
    - Parent null
    ObjB
    - Parent ObjA
    - Script:something.cs
    - - Value1 = "1"
    ObjC
    - Parent null

    Editor1 -> renames B to D, and moves it to C
    Editor2 -> changes settings on B

    Files look something like this:
    Editor1 FILE:
    ObjA
    - parent null
    ObjC
    - parent null
    ObjD // <-- note the change here
    - Parent ObjC
    - Script:something.cs
    - - Value1 = "1"

    Editor2 FILE:
    ObjA
    - Parent null
    ObjB
    - Parent ObjA
    - Script:something.cs
    - - Value1 = "2"
    ObjC
    - Parent null

    The merge tools only have the end files to look at, and none of the logic that placed them. For us, looking at the knowledge of how these moved, it is easy to understand, but imagine dozens of these changes. How is the merge tool supposed to know if ObjB and D are the same? If it is supposed to delete ObjB and put in ObjD?

    The argument is that each of these have ID's, Guids associated with them, so moving should be easy to determine, but that is not straight forward, as the structure is duplicated in the file. I have concepts that could simplify this, and have considered writing it before, such as Sort the save file by GUID, so that that object ID order is maintained, and most merge files will work with it, then save each one with a path to where it reloads. Merge tools would handle that structure much better. But, my guess is that Unity will attempt to come up with a serious improvement at the same time, and I'm curious as to what that might be.

    When they resolved many of the asset bundle frustrations with addressables, it had a profound improvement in build time for artists vs devs, as well as a great separation of concerns. In addition to auto script execution after bundle pull in, and auto streaming setup. I look forward to what they come up with, as it will likely include things I didn't think of, but save a great deal of work and/or provide new creative opportunities.