Skip to content

Latest commit

 

History

History
94 lines (57 loc) · 3.65 KB

File metadata and controls

94 lines (57 loc) · 3.65 KB

Quick Start

← Home


BuildLens running inside the Unity Editor

Before You Begin

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.


Step 1 — Run a Player Build

  1. Open File → Build Settings.
  2. Select your target platform.
  3. Click Build (not Build and Run).
  4. Wait for the build to finish. Unity writes Library/LastBuild.buildreport on completion.

BuildLens reads from that file. It is updated on every player build and is not a BuildLens file — Unity owns it.


Step 2 — Open BuildLens

Tools → BuildLens → Open BuildLens

The minimum window size is 900 × 560 px. If the window appears blank, resize it.


Step 3 — Run Analysis

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

Step 4 — Read the Overview

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.


Step 5 — Inspect a Dependency Chain

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.


Step 6 — Export (Optional)

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.


Next Steps

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