Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Merge Unity 3D scene with Git

I'm trying to implement a Git for a game project of mine. For scripts, it would work well because they are already in text. But what about scene files? They are binary files so merging them will be quite hard. What if I put a game object in the scene and another co-worker put another in the same scene? How would we merge our scenes? Or should we always export / import it manually?

Thanks in advance.

like image 959
Bawenang Rukmoko Pardian Putra Avatar asked Apr 06 '15 11:04

Bawenang Rukmoko Pardian Putra


2 Answers

You can save scene files in text mode: Edit->Project Settings->Editor->Asset Serialization: Force Text

This way scenes are saved as Yaml file, for more details on the format, have a look at the doc.

Despite I sometimes merge scene by hand, it's not a trivial operation, and you must be very careful (git automerge isn't able to merge them properly in 99% of the case).

like image 105
Heisenbug Avatar answered Sep 20 '22 09:09

Heisenbug


Generally holding binary objects in 'source' repository is controversial idea. However recently some specialized tools have appeared http://wiki.unity3d.com/index.php/UniMerge ... so they can be bought or written from scratch.

like image 30
jaroslawj Avatar answered Sep 17 '22 09:09

jaroslawj