Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

Advanced search

1409817 Posts in 69122 Topics- by 62792 Members - Latest Member: MewSoul

December 03, 2023, 04:11:55 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Unity and GitHub Scene Merging
Pages: [1]
Author Topic: Unity and GitHub Scene Merging  (Read 2681 times)
Level 0

View Profile
« on: January 06, 2021, 06:35:55 PM »

So my team has been running into a problem with GitHub and Unity. Whenever we try to merge branches our scene gets screwed up and causes problems. Were trying to look for a better way to do this. Does anyone who has experience working in big teams know how to solve this? Like a workflow or process of moving work into the main branch that can solve this problem? Anything will help!
Level 0

View Profile
« Reply #1 on: January 07, 2021, 12:15:11 PM »

There's no good built-in way to collaboratively work on the same scene in Unity.

Unity has a feature called Smart Merge that can keep a scene's YAML syntactically correct while merging. But that doesn't mean the end result will actually be what the level designers intend.

Kinematic Soup has a commercial tool called Scene Fusion that they cover in this article on different ways to collaborate on scenes.

If you don't want to use something like Scene Fusion, you can lock the scene in version control and pass around a token signifying which one person at a time is allowed to edit the scene. This may seem like a bottleneck, but you can reduce it significantly by making sure everything in scenes is a prefab. Then, apart from positioning objects, most of the work designers will be doing will be on prefabs, not the actual scene.
Level 0

View Profile
« Reply #2 on: January 07, 2021, 12:44:09 PM »

Thanks for the tips. I read up on SceneFusion and it seems pretty good thanks!
Level 2

View Profile WWW
« Reply #3 on: January 12, 2021, 04:49:59 AM »

There’s a GDC-presentation about the issue by one of the designers of Firewatch. Some of the information may be obsolete, but there might be something useful also.


Avaruustaistelupeli (ATP) - a space combat game
- Free download from itch.io or IndieDB
- Dev diary here

View Profile
« Reply #4 on: February 15, 2021, 05:17:26 AM »

Just a quick guide on how to set up scene merging for unity.
Setting up git
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:

    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.
Pages: [1]
Jump to:  

Theme orange-lt created by panic