Just a quick guide on how to set up scene merging for unity.
-
Should be located in C:\Program Files\Unity2018.2.6f1\Editor\Data\Tools\UnityYamlMerge.exe (or something similar).
-
Go to your global git config file. Should be located in C:\Users<your user>.gitconfig and open this file in a text editor.
-
Append the following to the end of the .gitconfig file:
[merge]
tool = unityyamlmerge
[mergetool "unityyamlmerge"]
trustExitCode = false
cmd = '<path to UnityYAMLMerge>' merge -p "$BASE" "$REMOTE" "$LOCAL" "$MERGED"
-
Download a merge tool and set it up, in my case I used diffmerge: download here
-
Configure the merge tool to work with git. For diffmerge: instructions here
-
At this point set up will be complete.
-
Attempt a merge a with two branches that have conflicting scene changes.
-
Run the command
git mergetool --tool=unityyamlmerge
to specify the scene merging tool. -
Unityyamlmerge will then resolve most conflicts automatically and open up your merging tool for you to resolve remaining conflicts manually.
-
Save and exit the merge tool, and commit the changes to complete the merge.