Assembly Warden
A downloadable tool
Hand-maintained reference lists are always wrong in one of two directions. Too many references, and every refactor drags dead weight. Too few, and you meet CS0246 at the worst time. Assembly Warden reads the answer instead of guessing: the compiler's own emitted AssemblyRef tables, mapped back onto your .asmdef files.
It acts - and proves the action safe
- Adds every reference your code genuinely uses but never declared.
- Deletes references nothing uses - then recompiles to verify, and rolls back byte-identically if anything breaks. The backup survives the domain reload.
- Surgical writes: only the references array changes. Key order, indentation, tabs, CRLF endings, versionDefines and defineConstraints all survive.
It knows what it must NOT decide
Two real mechanisms make a needed reference look unused: const inlining (the literal is baked in, no AssemblyRef emitted, but deleting the reference breaks the build) and conditional compilation (a reference used only inside an inactive #if emits nothing here - deleting it breaks your other build target). A second, independent source-text channel catches both and marks them Uncertain - kept, with the reasoning shown.
Architecture, enforced in CI
Declare layering rules as a project asset - "Gameplay must not reference UI". The scan reports violations, including emitted references your .asmdef never declared, and the batch-mode CI gate fails the build on them. Exit 0 clean / 2 violations / 3 refused (a project that does not compile has an untrustworthy graph - refusing is a feature).
What ships
- Assembly Warden window - UI Toolkit graph canvas, verdict-coloured edges, per-reference reasoning
- Verified apply pipeline: dry-run, diff, write, recompile, auto-rollback
- Layering rules asset + WardenCI batch gate + JSON reports
- Demo scene with a guided tour
- Full readable C# source in named Editor-only asmdefs - nothing enters your build
- 21 EditMode tests
Requires Unity 6000.x (built and gate-verified on 6000.5.7f1). Editor-only.
| Published | 11 hours ago |
| Status | Released |
| Category | Tool |
| Author | CSAF — Corey & Stephanie's Asset Factory |
| Tags | Automation, csharp, editor, gamedev, pipeline, plugin, programming, tool, Unity, utility |
| AI Disclosure | AI Assisted, Code, Graphics |
Purchase
In order to download this tool you must purchase it at or above the minimum price of $29 USD. You will get access to the following files:








