Conflux

A prefab merge tool for Unity. It resolves three-way conflicts by what a prefab means instead of what its text looks like, one property at a time, in three synchronized panels, against a merged preview you can open.

Every merge conflict on a prefab is the same afternoon. Git hands you two walls of YAML it can't reconcile, your merge tool offers to take one side whole, and whichever one you pick throws away work somebody did. Sometimes the file won't open afterwards. The worse case is when it opens fine and the prefab is quietly broken in a way nobody catches for a week.

None of that is Git's fault. What a prefab actually contains is component types, references and nested overrides, and none of it survives being compared as lines of text, so a line-based tool is being asked a question it has no way to answer. This one asks a different question: parse all three sides into a real object model, compare them field by field, and let Unity's own APIs rebuild the result.

Get Conflux

Semantic three-way diff

Every GameObject, component and property gets classified against the common ancestor: added, removed, changed on one side, changed the same way on both, or a real clash. Only the clashes are a question for you. The rest merge on their own.

Status markers on hierarchy rows across all three panels, with the toolbar tally above them
Markers on every row, and a running tally of each kind along the toolbar.

Three panels, one row layout

Ours, Merged and Theirs sit side by side, each with its own hierarchy and inspector. Selection, expansion and scrolling stay in step. All three columns share one row plan, so a property lands at the same height in every column by construction, not by syncing scroll positions and hoping. Drag a column's header to rearrange the three into whatever order you read best.

The three-panel Conflux window with a real conflict open
Ours, Merged and Theirs, sharing one row plan across all three columns.

Resolve as coarsely or as finely as you want

One arrow takes a whole GameObject or component from one side. If you'd rather go property by property, every diffing row carries its own picker. Choosing an entity cascades into whatever is still undecided beneath it and leaves anything you already decided alone.

Inspector rows showing each side's value and the picker that chooses between them
Each side's value in its own column, with the picker on Merged. Click to enlarge.

A merged preview you can open

The merged result is rebuilt from scratch after every decision and opens in Unity's real Prefab Mode. It's the actual prefab, built by the same APIs that will write it when you hit Apply.

The merged prefab open in Unity's Prefab Mode below the Conflux window
The merged result staged as a real prefab, open in Prefab Mode below the window.

Structure gets its own decisions

Sibling order, component order and reparenting are tracked apart from values, so a reorder on one branch and an edit on the other can both survive. When neither side's order is what you want, arrange it yourself in the Merged panel.

Order, reparent and manual arrange controls on the Merged panel
The Merged column's right edge: order, placement and manual arrange.

Keep both

Two branches that each appended to an array of object references, two UnityEvent listeners say, don't have to lose one. A third option keeps both, in order, with no duplicates. It's deliberately narrow and only appears where a union is actually well defined.

Sample conflicts, built in

Twelve hand-built scenarios: value clashes, modify/delete, reorders, reparents, an array both branches appended to, nested overrides, and one that stacks all of them five levels deep. They open through the same pipeline a real conflict does, so they're a decent way to learn the window before a real merge is on fire.

Whatever you version with

Git, Subversion, Mercurial, Perforce and Plastic SCM. Detection is automatic, and only the step that fetches the three versions differs between them, so everything you see and every decision you make is identical either way. Plastic needs its external merge tool pointed at Conflux once; the launcher is generated for you.

It backs up before it overwrites

Apply offers to save the prefab as it stood on your side before the merge, taken from the clean version rather than the marker-riddled file in your working copy. It lands in ConfluxBackups/ beside Assets/, so it's never imported as a second prefab. If the backup can't be written, nothing is overwritten.

How a merge goes

  1. Start a merge that produces conflicts on .prefab files under Assets/.
  2. Open Tools › Conflux › Merge. Conflicted prefabs are listed down the left.
  3. Resolve. Per entity from the hierarchy rows, per property from the inspector.
  4. Follow the toolbar tally (conflicts, changes, identical changes, additions, deletions, reorders) and jump between unresolved items with ▲ / ▼.
  5. Apply writes the merged prefab over the conflicted file. It stays disabled until nothing is left unresolved.

Apply writes the file and stops. No git add, no p4 resolve, no svn resolved. Marking a conflict resolved is what declares a merge finished, and that's your call to make once you've looked at the result. A wrong file is recoverable. A conflict you resolved by mistake quietly isn't.

Limitations

Worth knowing before you build a workflow on it:

Technical details

Get Conflux

On the Unity Asset Store. If you hit a conflict it can't handle, send it my way, real broken prefabs are the only thing that makes a merge tool better.

Get Conflux Forum thread