This tool finds and/or deletes unreferenced assets in Unity project. It can also list all assets in project and show who reference them.
Addressables and AssetReference detection is also supported. Enable it in tool settings if needed.
All code combined into one script for easier portability. So you can just copy-paste DependenciesHunter.cs to your project in any Editor folder. You can also install it via UPM using link https://github.com/AlexeyPerov/Unity-Dependencies-Hunter.git.
This tool Asset-Inspector does opposite analysis providing a list of dependencies for selected assets. So they might be useful in combination.
Complete list of other tools see in the end of this document.
At first, it calls
AssetDatabase.GetAllAssetPaths()
to form a map of all assets.
Then it uses:
AssetDatabase.GetDependencies
to find dependencies for each of those assets. As a result dependencies map is formed.
Then it simply finds all assets which are not presented as a dependency within this map. Such assets considered as unused if they aren't marked as to be ignored in this analysis (by a list of RegExp patterns).
The main analysis is based on Unity's AssetDatabase.GetDependencies, so it follows the references Unity exposes through asset serialization and import data.
Optional analysis settings can extend this:
Scan Addressables AssetReferencestreats serialized AddressablesAssetReferencefields as regular dependencies.Detect Addressablesmarks assets registered in Addressables settings and keeps them out of delete eligibility.- Terrain-data reference scanning can be enabled to catch terrain-related asset links that are easy to miss in regular dependency output.
Please note that runtime-only references are still possible false positives: assets loaded by string path, custom registries, reflection, remote catalogs, or code-generated paths may not be visible to Unity dependency APIs.
To enable addressables detection toggle option 'Detect Addressables'. In that case unreferenced assets which are addressables are not considered as unused by the tool and not shown by default.
By default Addressables AssetReference properties are not considered as a dependency by AssetDatabase.GetDependencies and thus are ignored by the tool.
However if you want to treat them as regular references go to Analysis Settings and set 'ScanForAssetReferences' toggle to true. Please note that this will make analysis a little bit longer since it changes the underlying mechanics and requires parsing assets as text.
The tool has two ways to use it. Each has a menu option, and an editor window.
..click on "Tools/Dependencies Hunter" option which will open the "Dependencies Hunter" window.
Here you can analyze project and perform unused assets deletion. Only assets with zero detected references and not marked as Addressable (if 'Detect Addressables' is enabled) are eligible for deletion. Use the selection/backup controls in the results window to review assets before applying deletion.
..select the assets and use a context menu option "[DH] Find References in Project". It will open the "Selected Assets" window with the results.
| Context Menu | Result Window |
|---|---|
![]() |
![]() |
In the Analysis Settings foldout you can set files to be ignored by providing a list of RegExp patterns. You can also uncheck the 'Show Unreferenced Assets Only' toggle to view the list of all your project assets with their references number, files sizes etc.
Ignore patterns are regular expressions matched against asset paths.
You can create a custom DependenciesHunterIgnorePatterns.asset under Assets/Editor from the settings foldout, or delete that settings asset to restore the built-in defaults on the next run.
| Analysis Settings | Listing all Assets |
|---|---|
![]() |
![]() |
- Using Unity's Package Manager via https://github.com/AlexeyPerov/Unity-Dependencies-Hunter.git.
- You can also just copy and paste file DependenciesHunter.cs inside Editor folder
Feel free to report bugs, request new features or to contribute to this project!
- To analyze addressables layout Addressables-Inspector.
- To find missing or empty references in your assets see Missing-References-Hunter.
- To analyze your textures and atlases see Textures-Hunter.
- To analyze your materials and renderers see Materials-Hunter.
- To analyze asset dependencies Asset-Inspector.
- Unity Editor Coroutines alternative version Lite-Editor-Coroutines.
- Simplified and compact version Pocket-Editor-Coroutines.





