Search Unity

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

Trying to Merge the MyScene.unity file

Discussion in 'Unity Collaborate' started by rcorak, Nov 16, 2017.

  1. rcorak

    rcorak

    Joined:
    Oct 18, 2017
    Posts:
    7
    We just started using Collaborate and are having some issues trying to merge the main scene's .unity file. It seems that all properties for GameObjects and components in the inspector are stored in this file. We have devs working within th esame scene all the time and a majority of the changes get reflected in this file.

    I am using BeyondCompare for the merge but the number of flagged diffs are huge and somewhat complicated to weed through.

    Is there a way to partition the project in a way so that the changes are easier to manage?
     
  2. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @rcorak! Trying to merge conflicts in a Scene file is tricky business since most diff tools only show you a text breakdown of the Scene's contents that isn't particularly easy for humans to read.

    There are two workarounds that I can suggest:
    1. Try turning some of your Scene's Game Objects into Prefabs. That way you can modify the Prefabs to how you like and the Scene file won't care because it's just holding onto a reference to that Prefab, which doesn't change even if you edit the Prefab. This can be useful for level geometry, characters, enemies, menus, etc that you'd like to group into their own object.
    2. Have a single Master version of your Scene and have each dev that wants to make changes to that Master make a copy that they can work in. If you only have your build include the Master Scene then you could push your changes to your copy Scene and keep working on it separately without worrying about breaking the build for anyone else. Then, when you're ready to merge your changes back in, just copy your changes from your copy Scene into your Master and resolve any conflicts that come up.

    In the future, we hope to simplify this process by adding some type of visual merge process for resolving scene conflicts but we don't have a timeline for that feature yet. In the meantime, I hope these suggestions help!
     
  3. rcorak

    rcorak

    Joined:
    Oct 18, 2017
    Posts:
    7
    Thanks Ryan. We are using some prefabs but I think we could use it more as a way to manage them. Is there any downside to creating them as prefabs?
     
  4. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Honestly, there aren't really any downsides (that I can think of) to using mostly prefabs in your scene. As long as you're careful on if you're editing the prefab itself (in the Project Browser) or just an instance of the prefab (from inside the scene) then you shouldn't run into any issues. It's also really great if you want to make lots of copies of a similar object since you can instantiate prefabs at runtime. There are lots of great uses for prefabs and I encourage you to experiment with them to find what works best for you!