Human-readable diffs for UnityYAML assets. Instead of raw text diffs, PrefabLens shows changes at the GameObject, component, and field level.
Try the live demo.
| Directory | Description |
|---|---|
core/ |
Diff engine in Zig (shared by the CLI and WASM) |
cli/ |
prefablens command-line tool |
extension/ |
Chrome extension for semantic diffs on GitHub pull requests |
editor/ |
Unity Editor package for semantic UnityYAML diffs |
site/ |
Live demo site published to GitHub Pages, built from the CLI and extension artifacts |
Install from the Chrome Web Store.
brew install hashiiiii/tap/prefablensscoop bucket add hashiiiii https://github.com/hashiiiii/scoop-bucket
scoop install prefablensmise use -g github:hashiiiii/PrefabLensDownload the zip for your platform from GitHub Releases.
Requires Unity 2022.3+.
openupm add com.hashiiiii.prefablensWithout the openupm-cli, add the scoped registry as described on the package page, or install via the Package Manager git URL: https://github.com/hashiiiii/PrefabLens.git?path=editor.
Shows semantic diffs for UnityYAML files on the GitHub pull request Files changed tab. Sign in with GitHub from the first diff panel (or the extension options page); authorization uses the GitHub device flow, so no token setup is needed.
Note
The extension is currently available on github.com only.
prefablens # HEAD vs working tree, all changed Unity files
prefablens Assets/Foo.prefab # HEAD vs working tree, one file
prefablens main # ref vs working tree, all changed Unity files
prefablens HEAD~1 HEAD Assets/Foo.prefab # ref vs ref, one file
prefablens before.prefab after.prefab # plain two-file compare (no git)
prefablens --json before.prefab after.prefab
prefablens --html main # self-contained HTML report on stdout
prefablens --open main # write the report to a temp file and open itOperands ending in a Unity YAML extension (.prefab, .unity, .asset, ...) are
treated as paths; everything else is a git ref.
Full reference — every flag, exit code, and resolution rule: docs/cli.md.
Open Window > PrefabLens. The window lists every changed UnityYAML asset vs HEAD and shows the selected asset's semantic diff. The CLI binary is downloaded automatically from GitHub Releases.
Details — configuration, the CLI download, troubleshooting: docs/editor.md.
Text-serialized Unity assets such as .prefab, .unity, .asset, .mat, .anim, and .controller. Excludes .meta, .asmdef, and other non-UnityYAML formats.
Toolchain is managed with mise (Zig 0.16, Node 24, pnpm 11, .NET 10).
mise install
# Core / CLI
zig build test
zig build run -- before.prefab after.prefab
# WASM (for the extension)
zig build wasm
# Extension
cd extension && pnpm install && pnpm run build && pnpm test
# Editor (EditMode tests run on .NET, no Unity required)
cd editor && dotnet test DotNetTests~/Tests
# Site (build the CLI, WASM, and extension demo bundle first: `pnpm run demo`)
cd site && node --test src/*.test.mjs && node build.mjsContributions follow an issue-first flow: open an issue and wait for the approved label before sending a pull request. See CONTRIBUTING.md for details.



