Best practices for version control in Unity

unity3dversion control

I'm a bit confused how to use version control with Unity, especially with objects such as scenes or prefabs that are not just code.

We had an issue recently when my colleague and I were working on different parts of the same scene. which resulted in conflicts, branching and merging galore.

In the end my revision was overridden by his changes anyway.

The only way I see at the moment is us taking turns working on the same objects, but it doesn't seem very convenient, especially since all of the work we're currently doing is in the scenes.

What do people usually do in these situations?

(We're using Mercurial, BitBucket, and SourceTree.)

Best Answer

You can try following solution if you're using GitHub.

  1. In unity open Edit-> Project Settings -> Editor, then in Inspector of project Settings.
  2. Change "Version control mode" to "Visible meta files".
  3. Change "Asset serialization mode" to "Force text".

This works fine for me.

Related Topic