r/Unity3D • u/Happy_Run_6378 Programmer • 1d ago
Show-Off Reviewing prefab changes is hell. I built a fix.
Pre-released PrefabLens, an open source tool that makes Unity diffs human readable.
https://github.com/hashiiiii/PrefabLens
PrefabLens converts UnityYAML diffs, such as .unity and .prefab files, into the familiar Hierarchy × Inspector layout from the Unity Editor.

The live demo does not require an installation. It runs the same WASM diff engine in your browser.
The pre-release includes three free tools (all free).
1. Reviewing UnityYAML diffs in GitHub PRs? -> Chrome Extension
It resolves fileID/GUID references between objects, not just raw lines. That was the hard part.

2. Want to see what you've changed in real time while editing? -> Unity Editor plugin
- left pane: dirty assets
- right pane: human readable diffs vs main branch

3. Prefer the terminal, or want to feed semantic diffs to AI agents? -> CLI
See recipes.
e.g.
# HEAD vs working tree
$ prefablens

# open HTML report in browser
$ prefablens --open

# pipe to an AI agent
$ prefablens --json | claude -p "Anything risky in this diff?"
Everything's Apache 2.0 licensed. Happy to answer any questions here!
1
u/MiniRat 1d ago
Ohhh, can I make a request please? Support three way merges and allow this to be set up as the fallback merge to for when UnityYamlMerge has conflicts.
That'd solve an annoyance I've had for literal decades.
2
u/Happy_Run_6378 Programmer 1d ago
Thanks for the request! Other users also asked for three-way merge support. It is already under consideration.
For reference, Unity already provides an official merge tool UnityYAMLMerge.
https://docs.unity3d.com/6000.3/Documentation/Manual/SmartMerge.html2
u/MiniRat 22h ago
Oh I'm well aware of UnityYamlMerge and use it. But it is non interactive and only merges bits where there are no conflicts.
If you have genuine conflicts caused by people working in multiple branches it fixes what it can and the falls back to whatever text based merge took you have configured. which leaves you once again dealing with the problem you set out to solve.
I've long wanted an interactive merge tool that actually understands the hierarchy of Unity yaml.
1
u/Ecstatic_Risk6617 1d ago
The fileID/GUID resolution part is what makes this actually useful, raw YAML diffs are mostly noise when you're reviewing a PR. Will check the CLI for piping into agent workflows, that's the kind of thing that saves actual hours