🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Unity and Github Scene Merging

Started by
2 comments, last by JohannesDeml 3 years, 5 months ago

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!

Advertisement

First thing to change is set scene serialization into text mode. GitHub is not good at managing binary data so this a requirement. Everything else you can do is to manage who works on a scene and only permit one person to “lock” the scene for work. What happens else might be that Unity is messing up with Asset IDs and everything goes crazy.

One tip for large teams is to split scenes into a primary scene and several sub-scenes, so you don't run into “locked” scenes that often

Everything what @shaarigan said plus

  • When you use prefabs, all data is stored in the prefabs, the scene only stores changes made to the prefabs. So it is a good idea to make use of prefabs (also if the object exists only once) and don't forget to apply the changes to the prefabs!
  • You can additively load scenes, therefore splitting the scenes and having them loaded additively can help a lot.
  • It might not be necessary for everybody to work in the main scene, give them a playground where they can work on specfic tasks and use prefabs, so the changes are synced to your main scene.
  • If there is a merge conflict, you might be able to resolve it by hand. It's YAML after all (at least when you serialize to text).

None

This topic is closed to new replies.

Advertisement