Zion Dependency Graph
See every reference. Trust every delete.
Overview
A node-based dependency graph viewer for Unity. Pick any asset and see exactly what references it - and what it references - as an interactive, zoomable graph. Built for the moment before you delete something and aren't sure what'll break.
Why this, not another cleanup tool?
Most asset cleanup tools give you a flat "unused assets" list and ask you to trust it - and every one of them shares the same blind spot: assets loaded from code by string. Nothing in Unity's AssetDatabase records that a script calls Resources.Load("Prefabs/Enemy"). Zion Dependency Graph does both halves: it reads your assets and your scripts. Find a suspected orphan, open it in the graph, see the empty inbound side with your own eyes, check no code loads it by string, then delete with a verified, timestamped backup. The whole workflow is built so you never delete something you can't recover.
New in v1.2 - the tool now reads your code
- Code string reference detection - finds
Resources.Load/LoadAsync/LoadAll,Shader.Findand Addressables keys in your scripts, and resolves each call to the asset it loads, with a click-through to the exact file and line - Find Path - pick any two assets and see exactly how one depends on the other, shortest chain first
- Two delete warnings - the confirmation dialog names the script and line when code loads an asset you're about to remove, and warns when other assets still reference it
- Case-mismatch lint - flags
Resources.Loadpaths that work in the editor but fail on case-sensitive platforms - Verified backups - every backup is checked on disk before deletion is allowed
Features
- Interactive dependency graph powered by Unity's GraphView (pan, zoom, minimap)
- "Used by" reverse-lookup for any asset - right-click in Project → Show Dependencies
- Code string reference detection - Resources.Load, Shader.Find and Addressables keys resolved to real assets, listed with file and line, updated incrementally on script save
- Find Path mode - the shortest dependency chain between any two assets plus alternative routes, every step clickable
- Conservative orphan detection that excludes Resources, StreamingAssets, build scenes, scripts, ProjectSettings references, assets loaded by code strings, and (when installed) Addressables entries
- Dupes tab - finds groups of byte-identical files (SHA-256 verified); click any copy to see which one is actually in use before removing the rest. Runs only when you ask, so it never freezes the editor
- Heavy assets view - top 200 by file size, biggest first, to find oversized textures and models fast
- Type filter (textures, materials, prefabs, audio, scenes, shaders…)
- Asset detail panel with size, type, reference counts, and code call sites
- Safe delete with verified backup - every asset and its .meta is copied to
ZionDependencyGraph_Backups/and checked on disk before anything is removed; full restore from any backup - Background scanning - the project index builds incrementally without freezing the editor; cancel at any time
- Keyboard shortcuts - F to focus, P for Find Path, Delete to safe-delete, / to search
- Remembered settings - depth, type filter, active tab, and panel widths persist between sessions
- Graphviz DOT export for high-quality external rendering
- Markdown + CSV cleanup report
- Recently-inspected list persisted per project
Honest Limits
Static analysis can't see everything, and the tool is explicit about it rather than pretending otherwise:
- Loads built from variables, interpolated strings or concatenation cannot be resolved by any static scan - but as of v1.2 those call sites are detected and listed anyway, so the blind spots are visible instead of silent
- Procedurally assigned materials and runtime-instantiated assets are invisible to static analysis
Ideal For
- Cleaning up large or long-running Unity projects with confidence
- Auditing a project before an Asset Store submission or handoff
- Tracing exactly what an asset depends on - and what depends on it
- Finding out which assets your code loads by string, and from where
- Removing duplicate and orphaned files safely, with a recoverable backup
Technical Details
- Interactive node-based dependency graph (Unity GraphView): pan, zoom, minimap, layered layout
- Code string reference detection - scans .cs files for Resources.Load / LoadAsync / LoadAll, Shader.Find and Addressables keys (addresses and labels); comment-aware, literal-only, resolved to project assets with file + line
- Incremental code index - script saves re-scan just that file, no rescan button
- Find Path - bidirectional search between any two assets; shortest chain plus alternatives, instant even on 50,000+ asset projects
- Case-mismatch lint for Resources.Load paths (editor-works / device-fails detection)
- Conservative orphan detection - excludes Resources, StreamingAssets, build scenes, scripts, ProjectSettings references, Addressables entries, and assets loaded by code strings
- Multi-select safe delete with verified timestamped backups + one-click restore from any backup
- Heaviest-assets view (top 200 by file size) for quick triage
- Duplicate file detection - Dupes tab finds groups of byte-identical files (SHA-256 verified, size-bucketed for speed); zero false positives by design; opt-in per session
- Background scanning - project index builds incrementally without freezing the editor; cancellable at any time
- Asset detail panel - type, size on disk, "used by" / "uses" reference counts, code call sites with click-to-line
- Type filter: textures, materials, prefabs, audio, scenes, shaders, animations, fonts
- Right-click any Project asset → instant dependency graph
- Recently-inspected list, persisted per project
- Configurable depth (1–5 hops) with auto-capped rendering for responsiveness on 15,000+ asset projects
- Graphviz DOT export of the current graph (renders to publication-quality PNG/SVG)
- Markdown + CSV cleanup report
- Optional Addressables integration (auto-detected via reflection, no hard package dependency)
- Editor-only - zero runtime cost, no build size impact
- Compatible with URP, HDRP, and Built-in render pipelines
Requirements
- Unity 2021.3 LTS or newer
- Editor-only - adds nothing to your build or runtime
Frequently Asked Questions
Does it modify my project automatically?
No. It surfaces dependencies, orphans and duplicates for you to review - you decide what to remove, and every deletion is backed up first.
How does it detect Resources.Load and Addressables usage?
Every .cs file under Assets/ is scanned for string-based load calls - Resources.Load and its variants, Shader.Find, and Addressables keys. The scan strips comments first and only trusts plain string literals, so a call mentioned in a comment or a log message never produces a false match. Each resolved call is listed in the detail panel with its script and line number, and clicking it opens your IDE at that exact line.
Is it safe to delete a flagged orphan?
Orphan detection is deliberately conservative, and as of v1.2 it also cross-checks code string references, so assets your scripts load are never flagged. You can open any asset in the graph to confirm its inbound references are empty before deleting. Every safe delete copies the asset and its .meta to a timestamped backup folder and verifies the copy on disk before anything is removed - and the confirmation dialog warns you if code loads the asset or other assets still reference it.
How does duplicate detection avoid false positives?
The Dupes tab groups byte-identical files using SHA-256 verification (size-bucketed for speed), so only true duplicates are flagged - never assets that merely look similar.
Will it freeze the editor on a huge project?
No. The project index builds incrementally in the background and is cancellable at any time, graph rendering is auto-capped to stay responsive on projects with 15,000+ assets, and duplicate hashing runs only when you click Find Duplicates - never automatically on startup or entering Play mode.
Can it detect every reference?
Serialized references and literal string loads (Resources.Load, Shader.Find, Addressables keys), yes. Loads built from variables or string interpolation only exist at runtime, so no static tool can resolve them - but v1.2 detects and lists those call sites anyway, so you can see exactly where the blind spots are instead of trusting there are none.
See every reference before you delete
The dependency graph that reads your code - interactive graph, code-aware orphan cleanup, and verified backups. Available now.