Asset Server: Conflict resolution of .unity scene files

Hi everyone,

We’re running a sort of shake-down of Unity at the moment to get ready for our first Unity-based project for a client, by making a small racing game in 3-4 days. We’re trying to incorporate as many settings, methods and production pipeline steps as we can into the process, to find an optimal workflow for us, and to establish workarounds for any potential problems that we find.

As a four-person team we’re using the Asset Server, which seems to be working mostly fine. One issue that has arised today, however is conflict on .unity scene files.

Specifically, we have a LevelScreen.unity file, which contains the main level. This is of course where several of us are doing the bulk of our work, and it often happens that at least two of us are working on it at the same time, albeit at different things (a checkpoint prefab and the camera settings, as the case were this last time, for example).

When one of the users commits his changes, this includes the .unity file, and when the others (who have also worked in the same scene) then update from the server, a conflict arises. In the conflict resolution dialog, of course, there is no option to merge the differences between the files. The only options are to discard either set of changes; your own, or the ones commited to the server. So, you’re bound to loose somebody’s changes, at least when the last user commits his changes (if he decided to ignore all changes from the server).

My question, then, is how do people either:

  1. ensure that only one person work on each .unity scene file at any given time
    or
  2. merge differences and resolve conflicts in .unity files?

Number 1 is difficult, given that there is no “lock” function on the Asset Server, that I have found (and no “merge” of the result when the lock is lifted, and users update).

Number 2 seems equally difficult to implement, given that all the merging is done behind the scenes in Unity, and this, by design, only allows to “select Merge for text assets like scripts” (ref. Asset Server Guide).

So, any thoughts or comments from the community on this?

Thanks!

It can definitely be a headache.

The best thing we’ve come up with is to use prefabs as much as possible. That way you can just commit changes to a prefab instead of the whole scene.

This can get tricky as well because there isn’t support for prefabs within prefabs, and having links in a prefab to non-prefabbed things in a scene tends to be brittle.

Cheers,
-Jon

We do the same–as much as possible becomes a prefab. Most of our game levels can be updating significantly by applying changes back to the prefabs. Sometimes we use empty gameobjects as locators and spawn prefabs there, to get around the prefab-in-prefab limitation. It’s kind of a pain, though.

Of course, we still need to edit the level to add new prefabs or to change some placement. We don’t do anything clever here. We’re all in the same room, so someone just announces, “I’m about to change Level X, is anyone working on it?”

Ok, thanks for the input guys. The good news is that we’re obviously not the only ones facing this challenge.

The make-every-compound-object-a-prefab route is of course a nice idea regardless of asset server issues, and we’ll try to implement that in our standard procedures. It will indeed have the added benefit of getting around a number of scene-file merge problems, but I get a feeling that this may really limit the complexity we can “safely” put into one scene. Hm… we’ll have to think about that one.

Regarding the “is anyone working on scene X?” approach, that’s basically what we’re doing now. It works fine when the project is complex enough (each team member working mostly on a separate scene) or really simple (no two people need to work on the same thing at the same time). Most of the time, however, I believe we will have at least two people working on the same scene file, so how can they work efficiently and still share their individual progress with the rest of the team?

We´re about to run into the same issues as well right now. May i ask, if you came to any satisfying solution (since this conversation is nearly two years old now…)

Thank you very much for sharing your experiences with the asset server workflow!

The only solution is to not work concurrently on scenes or have a user that always has “major right” and overwrites whatever local changes have been applied.

Try using text instead of binary format. Go to Edit > Project Settings > Asset Serialization and select Mode “Force Text”
2584930--180719--upload_2016-4-6_11-33-14.png