t1k:unity:base:asset-hunter-pro
| Field | Value |
|---|---|
| Module | base |
| Version | 2.2.2 |
| Effort | medium |
| Tools | — |
Keywords: asset hunter, assets, cleanup, optimization
How to invoke
Section titled “How to invoke”/t1k:unity:base:asset-hunter-proAsset Hunter Pro
Section titled “Asset Hunter Pro”Unity Editor tool for identifying unused assets, tracking dependencies, finding duplicates, and analyzing build reports. Package: com.heurekagames.assethunterpro v2.2.26.
Quick Reference
Section titled “Quick Reference”| Feature | Menu Path | Key Class |
|---|---|---|
| Unused Assets | Window/Asset Hunter PRO/Asset Hunter PRO | AH_Window |
| Dependency Graph | Window/Asset Hunter PRO/Dependency Graph | AH_DependencyGraphWindow |
| Duplicate Finder | Window/Asset Hunter PRO/Duplicate Assets | AH_DuplicateWindow |
| Settings | Window/Asset Hunter PRO/Settings | AH_SettingsWindow |
Core Workflow
Section titled “Core Workflow”1. Run a Unity build (auto-logs to .ahbuildinfo)2. Open Asset Hunter PRO window3. Load latest report → review unused assets in tree view4. Exclude false positives (scripts, addressables, plugins)5. Delete confirmed unused assets6. Re-verify with dependency graphExclusion System (5 Categories)
Section titled “Exclusion System (5 Categories)”| Category | Example | Use Case |
|---|---|---|
| Paths | Assets/Plugins/ | Third-party folders |
| Types | MonoScript | Scripts (common false positive) |
| Extensions | .shader, .cginc | Shader includes |
| Files | Assets/Resources/config.json | Specific files |
| Folders | Editor, Gizmos | Unity special folders |
Programmatic API
Section titled “Programmatic API”using HeurekaGames.AssetHunterPRO;
// Settings singletonvar settings = AH_SettingsManager.Instance;settings.AddPathToExcludeList("Assets/Plugins/");
// Reports stored as .ahbuildinfo JSON in project// Access via AH_BuildInfoManager (through AH_Window)See references/api-reference.md for full API.
MCP Integration
Section titled “MCP Integration”Use manage_asset_hunter MCP tool for automated queries:
scan_unused— list unused assets from latest reportget_duplicates— find duplicate assets by content hashget_dependencies— query asset reference graphget_settings— current exclusion configuration
Critical Gotchas
Section titled “Critical Gotchas”- Scripts appear unused — MonoScripts referenced only by code show as “unused”. Exclude
MonoScripttype - Must run a build first — No
.ahbuildinfo= no unused asset data - Addressables false positives — Assets loaded via Addressables API won’t appear in dependencies
- Large project perf — First scan of >10K assets takes 30-60s, cached after
- Editor-only — All API is
#if UNITY_EDITOR, no runtime - DOTS entities — ECS entity prefabs baked via SubScene are tracked normally
See references/gotchas.md for workarounds.
References
Section titled “References”references/workflow-guide.md— Scan, clean, CI integration stepsreferences/api-reference.md— Public classes and methodsreferences/gotchas.md— Known issues and workarounds
Security
Section titled “Security”- Editor-only, no runtime code, no external data transmission
- Reports contain file paths (project structure visible if shared)
- Delete operations irreversible — verify before bulk delete
Bulk-Delete Safety Protocol
Section titled “Bulk-Delete Safety Protocol”Before any bulk-delete (>10 assets), MUST:
- Snapshot the project via VCS (
git stash --include-untrackedor branch-and-tag). - Dry-run first —
Asset Hunter Proreports include a--dry-runmode that lists what would be deleted; review the list outside the editor. - Whitelist external references — Resources/, Editor/, StreamingAssets/, Unity packages — these can be referenced via paths NOT detected by AssetDatabase, so include them in a manual review.
- Test rollback path before executing —
git restore .from the post-snapshot state should fully recover. - Capture the report artifact — the pre-delete report is the only forensic record of what was removed; save it outside the project tree before running the delete.
If any step is skipped, do NOT execute the bulk-delete — escalate via team review instead.