Notes on Unity's serialized formats.
Findings from building parsers for .unity, .prefab and
.mat files — mostly the behaviour that is real, reproducible and
absent from the documentation.
-
Prefabs ·
Every prefab variant is born with 11 overrides
Create a variant, change nothing, and Unity still writes eleven entries into
m_Modifications— twenty-one if the root is a RectTransform. What they are, why they exist, and why override counts are meaningless without a baseline. -
Diffing ·
Why a text diff of a .prefab file lies to you
Renames read as rewrites, reparenting disappears, migration noise looks like intent, and three format corners break naive parsers. The fix is to diff identities rather than lines.
-
Version control ·
Resolving Unity scene merge conflicts in Git
Setup that only helps in advance, the order of operations during a conflict, the boundary of what UnityYAMLMerge can do, and the checklist to run before staging a merged scene.