BuildLens reads the output of a completed Unity player build. If you want to explore the tool before running a build, use Demo Mode instead.
- Open File → Build Settings.
- Select your target platform.
- Click Build (not Build and Run).
- Wait for the build to finish. Unity writes
Library/LastBuild.buildreporton completion.
BuildLens reads from that file. It is updated on every player build and is not a BuildLens file — Unity owns it.
Tools → BuildLens → Open BuildLens
The minimum window size is 900 × 560 px. If the window appears blank, resize it.
BuildLens analyses automatically as soon as a player build finishes successfully — a post-build hook calls the same analysis used by the toolbar button. If the BuildLens window was open during the build, results appear on their own within a moment of the build completing and you can skip straight to Step 4.
Click ▶ Analyze yourself if you want to re-run analysis on demand — for example, after a build that happened before you opened the window, or to refresh against the current Library/LastBuild.buildreport without building again.
BuildLens runs three phases:
| Phase | What Happens |
|---|---|
| Loading build report | Reads Library/LastBuild.buildreport. Extracts all PackedAsset entries. |
| Scanning dependencies | Calls AssetDatabase.GetDependencies() per asset. Builds a directed graph of forward and reverse references. |
| Saving snapshot | Serialises the snapshot (nodes + graph) to BuildLensData/snapshots/. Updates the history index. |
When complete the status label shows:
✓ 312 assets · 67.17 MB
The Overview tab is active by default. It shows:
- A treemap (left): every asset as a rectangle proportional to its compressed size, colour-coded by type.
- An asset list (right): assets ranked by compressed size.
- A filter bar: toggle type chips to isolate categories.
- A summary bar: platform, asset count, compressed size, uncompressed size, capture time.
Click any treemap rectangle to select that asset.
After selecting an asset, click the Dependencies tab.
- Dependencies — what this asset needs — is shown immediately, full width, no setup required.
- ▸ Used by — what caused this asset to be included — sits collapsed just below it. Click to expand; the count is visible even collapsed.
Click any row and a detail pane opens on the right showing that asset's own info, plus its own Dependencies/Used-by toggle and a Depth selector for deeper, transitive exploration — that's where Depth (1, 2, 3, Full) lives, not the primary view.
When a snapshot is loaded, the toolbar shows ↓ JSON and ↓ CSV. A save dialog opens with a pre-filled filename. The JSON export (schema v1.1) includes per-asset dependencies and dependents arrays.
| Goal | Document |
|---|---|
| Filter and sort assets | Overview Panel |
| Understand dependency chains deeply | Dependency Panel |
| Compare two builds | History Panel |
| Explore without a real build | Demo Mode |
| Understand what BuildLens cannot do | Limitations |
