Using Guide
Unused Asset Cleaner is a powerful and safe utility for Unity Editor that helps you identify, quarantine, and permanently delete unused assets in your project to keep your project size small and compile times fast.
Scan Types Comparison
| Feature / Characteristic | Scan Unused Assets (Fast) β‘ | Deep Scan (Check Code) π |
|---|---|---|
| Speed | Very Fast (Instant) | Relatively slower (has Loading Bar) |
| How it Works | Only reads built-in Unity dependencies (YAML data) such as those in Inspector & Scene List. | Reads built-in Unity dependencies, then opens and reads all .cs files in the project. |
| Script Detection (AddComponent etc.) | β Fails to detect. Scripts used in AddComponent will be considered unused. | β Successfully detects. System searches for script names textually (Regex) across all code. |
| Non-Build Scene Detection | β Successfully detected. Generates a Yellow label (β οΈ Used in non-build scene). | β Successfully detected. Generates a Yellow label. |
| Blue Label (Code Referenced) | β Does not appear, because the code is never read. | β Appears, the system lists the script name that uses the asset (βΉοΈ CodeReferencedBy). |
| Usage Suggestion | Used when you are sure the folder only contains Textures, Audio, 3D Models, or Prefabs. | Used if the folder contains Scripts (.cs) or when you are not sure if there are hidden code relations. |
How to Use
1. Starting a Scan
To start cleaning, right-click on any folder in your Project window and select Quick Setup > Clean Unused Assets Here or Quick Setup > Clean Unused Assets Here (Deep Scan).
2. Reviewing the Results
Once the scan is complete, the Unused Asset Cleaner window will open, displaying all assets that are deemed unused.
- [!] Used in [Scene Name] (not in Build Settings): This yellow warning means the asset is technically used, but only in a scene that isnβt included in your final build. Clicking the warning will select the scene.
- [i] Only referenced via code in [Script Name]: This blue info label means the script is never attached to a GameObject, but is referenced in the code of another script. Clicking the warning will select the referencing script.
3. Taking Action
Check the boxes next to the assets you want to manage, then look at the Cleanup section at the bottom:
- Move to Quarantine: Moves the selected assets to
Assets/UnusedAssetsBackup~. Unity will stop tracking them. Use this to safely test if your game still works without these assets. - Delete Permanently: Immediately deletes the files. This cannot be undone.
4. Restoring Files
If you quarantined an asset and realize you actually needed it:
- Scroll down to the Quarantine & Restore section.
- Click Restore All Quarantined Files.
- The assets will be moved back to their exact original folders.
5. Managing Exclusions
If you want to keep an asset that the scanner thinks is unused, click the Mark as Used button on its row. It will be moved to the Exclusion List at the bottom of the window. If you ever want to scan it again, simply click Remove in the Exclusion List section.
Technical Details
- Exclusion Data: The list of excluded assets is stored safely in
ProjectSettings/UnusedAssetCleanerExclusions.jsonso it can be shared via Version Control (Git) with your team. - Quarantine Location: Quarantined files are moved to
Assets/UnusedAssetsBackup~. The~at the end of the folder name tells Unity to completely ignore the folder, preventing it from processing the assets or including them in builds.