Unity Scene Comparison

How to Compare Unity Scenes Between Git Branches or Commits

To compare a Unity scene between Git branches, first choose the correct comparison range, list changed Unity assets, and inspect the exact .unity revisions. Use a merge-base comparison for pull-request intent, an endpoint comparison for two snapshots, and a semantic scene diff when hierarchy, references, or prefab instances matter.

7 Wolves July 29, 2026 9 min read Semantic Diff and History

Choose the right Git comparison

QuestionCommandMeaning
What did the feature branch add since it diverged?git diff main...featureMerge base to feature tip; closest to a pull-request change set.
How do two branch tips differ now?git diff main featureDirect endpoint-to-endpoint snapshot comparison.
How do two exact commits differ?git diff <old> <new>Stable historical comparison independent of moving branch names.
What changed in one commit?git show <commit>Commit versus its parent, including metadata.

For code review, the three-dot form is usually the useful answer because it isolates changes introduced after the feature branch diverged from the target.

Narrow the diff to Unity assets

git diff main...feature -- Assets/Scenes/World.unity

git diff --name-status main...feature -- \
  'Assets/*.unity' 'Assets/*.prefab' 'Assets/*.asset' 'Assets/*.mat'

Inspect related .meta, prefab, material, ScriptableObject, and script changes. A scene reference can change behavior because its target changed even when the scene YAML itself moved only one GUID.

Open a semantic branch or commit comparison

A raw Git diff is useful for exact text, but it does not organize Unity YAML into object ownership and hierarchy. MergeSight branch and commit scene comparison can load working-tree, branch, and commit sources, then show supported assets as semantic changes.

  1. Select the target branch or exact base commit as the left source.
  2. Select the feature branch, commit, or working tree as the right source.
  3. Filter the changed asset list to .unity files or the relevant path.
  4. Inspect added, removed, modified, moved, reordered, and child-changed items.
  5. Resolve GUIDs and fileIDs to asset or object context.
  6. Export Markdown or JSON when the reviewer needs an auditable summary.

Scene review checklist

  • Which GameObjects were added, removed, renamed, or duplicated?
  • Which objects changed parent or sibling order?
  • Did transforms, active state, layers, tags, or serialized component values change?
  • Were components added or removed from the intended owners?
  • Do changed references resolve to the intended local objects and project assets?
  • Did source prefab changes or instance overrides alter scene behavior?
  • Are lighting, navigation, or generated-data changes expected and reproducible?

Diff comparison versus merge conflict review

A two-source comparison answers how two snapshots differ. It does not classify conflicts against a common ancestor. If both branches changed the same scene and Git starts a merge, switch to Base / Ours / Theirs so one-sided edits can be distinguished from both-edited and delete-versus-edit decisions.

Do not use git diff alone to justify choosing Ours or Theirs for the complete scene. That discards whichever branch is not selected and can silently remove valid work.

Make comparisons repeatable

  • Record commit hashes in review notes when branch tips may move.
  • Use the same target branch and merge-base convention across reviewers.
  • Keep generated or imported churn out of the branch before review.
  • Attach a semantic summary for large scene changes.
  • Re-run the comparison after rebasing or merging the target branch.

FAQ

How do I compare a Unity scene between two Git branches?

Use git diff with the intended branch range and the scene path. For pull-request changes use main...feature; for branch-tip snapshots use git diff main feature.

What is the difference between two-dot and three-dot Git diff?

A direct two-endpoint diff compares the two named tips. A three-dot diff compares the merge base of the branches with the second tip, which usually isolates feature-branch changes for review.

Can MergeSight compare Unity scenes between commits?

Yes. MergeSight Review Mode supports working-tree, branch, and commit sources for text-serialized Unity assets and presents their changes semantically.

Why does a small scene edit create a large Git diff?

Unity serialization can touch document order, hierarchy records, references, and related objects even when the conceptual change is small. A semantic diff groups those lines by Unity meaning.

Summary

Pick the correct range

Use merge-base comparison for PR intent and exact commits for stable historical review.

Narrow the asset scope

Inspect the scene plus related prefabs, materials, ScriptableObjects, scripts, and meta files.

Review Unity structure

Explain hierarchy, components, properties, overrides, and references before accepting the branch.

A reproducible scene comparison names both sources, explains Unity-level changes, and separates review from 3-way conflict resolution.

Next step

Apply the comparison inside a review policy with How to Review Unity Scenes and Prefabs in Pull Requests.