4

SO I followed the instructions from here and tried to set up a merge for scenes in unity. The instructions about SourceTree are right at the bottom. I added the merge tool provided by unity as a custom merge tool, but when I try to merge a branch that changed the scene into my branch I get a conflict and the merge fails. I'm a total noob at this thing and don't know what to do now. Is it possible to make it automatic or I have to write some stuff in the terminal and if I do what should I write to resolve conflicts in a unity scene. I am also using the personal version of Unity3d if that matters.

Edit: i've managed to run the merge tool but now it is saying Error parsing file... File is not a valid text serialized YAMLfile.

The thing is i'm sure that Asset Serialization is set to Force text in the Editor settings.

2 Answers 2

4

One of the best ways to merge scenes in Unity is the mix of the next tools:

  • SourceTree - a source git tool
  • UnityYAMLMerge - a build-in Unity tool
  • Meld - a custom merge tool

The main idea is to tell Unity to use UnityYAMLMerge to parse the scenes code and pass it to Meld for merging.

enter image description here

The next video is showing this process with lots of details: Unity, SourceTree and Merge Conflicts

1
  • Hi I tried using this method it works in my sample unity project. But if try the same with my actual project the Launch External Merge tool is not opening in source tree. Is there a limitiation in scene file size. In my sample project the scene size is 23KB where as in my actual project the scene size is 10MB. Also this setup is working only in windows OS and not in MAC OS. My unity version is 2017 and source tree is 2.3.5 Commented Nov 17, 2017 at 9:12
2

Use "Launch External Merge Tool" :

Screenshot of menu option

1
  • I figured it out already but I will accept your answer for future people
    – Uri Popov
    Commented Apr 12, 2016 at 13:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.