mengzhishanghun - SimpleAssetCleaner

# 🧹 SimpleAssetCleaner Plugin


SimpleAssetCleaner automatically cleans unreferenced assets from your Unreal Engine project, keeping your repository clean and organized.


⚠️ Important: This plugin integrates with source control systems to manage assets. Please read the documentation carefully before use.


## 🎯 Core Problem Solved


Traditional Asset Management Pain Points:

- Unreferenced assets accumulate in the repository over time

- Manual cleanup is time-consuming and error-prone

- Difficult to identify which assets are actually unused

- Source control submissions include unnecessary files


SimpleAssetCleaner Solution:

- Automatically detects unreferenced assets before submission

- Intelligent reference chain analysis from root assets

- Safe cleanup with configurable root asset types

- Integrates seamlessly with Perforce, Git, SVN, and other VCS

- Safe for newly added files: Reverts unreferenced added files without deleting local copies


## ✨ Key Features


- Auto-Clean on Submit: Automatically checks and removes unreferenced assets when opening the submit dialog

- Safe Revert for New Files: Newly added unreferenced files are reverted from source control while keeping local copies intact

- Manual Full Clean: One-click cleanup of all unreferenced assets in the project via settings

- Smart Reference Analysis: DFS-based reference chain tracking from configurable root assets (Maps, Blueprints, etc.)

- Content Folder Only: Only analyzes and cleans assets in `/Content/` folder - external plugins and engine assets are never touched

- Performance Optimized: Memoization caching for analyzed reference paths

- VCS Integration: Works with Perforce, Git, SVN through Unreal's source control API

- Configurable: Full control over root asset types, custom root assets, and exclusion paths

- Verbose Logging: Optional detailed logging for debugging and monitoring


## 🚀 Quick Start


1. Install the plugin in your project's `Plugins` folder

2. Enable the plugin in Project Settings > Plugins

3. Configure root assets in Project Settings > General > Simple Asset Cleaner

4. Enable Auto Clean to automatically check assets on submission

5. Use "Clean All Source Control Assets" for manual full project cleanup


## 📖 Documentation


Complete tutorial and usage guide available in `/Docs/README.md`


## ⚙️ System Requirements


- Source Control: Perforce, Git, SVN, or any VCS supported by Unreal Engine

- Build Type: Editor-only plugin (does not affect packaged builds)


## 📬 Support


For technical support or questions: mengzhishanghun@outlook.com


I received an email saying that I wouldn’t use this plug-in, so I’m here to give you a simple demonstration of how to use it.

First of all, we must first confirm whether the source code management tools, such as git, perforce, etc., are turned on correctly. All those supported by the UE are okay, because this plug-in needs to be used with source code management. Here we use perforce as a demonstration

You can see that Perforce_Proxy is displayed here instead of Perforce. This is normal. When you select perforce or git, create a proxy automatically and generate Perforce_Proxy or Git_Proxy.

Just choose normally, do not select Proxy. Proxy is generated automatically.

Finally, how to clean up the entire asset with one click. You only need to check “Clean All Source Control Assets” in Project Management and Plug-in Settings, and the entire project will be cleaned up automatically.

In addition to cleaning all at once, the plug-in also supports automatic cleaning. This feature is turned on by default, which is the “Enable Auto Clean” option above. It will execute when you submit new assets to source code management, unsubmit unreferenced assets, and Local retention will not delete assets, ensuring that your source code management warehouse is clean.

Note that this will not affect your assets that are already in version management.

All of the above operations need to be performed in the UE, and external execution will not be triggered.