Assets Cleaner, a tool to manage unused assets

The tool is now live on the marketplace!!
Go check it out over here: Assets Cleaner - Project Cleaning Tool in Code Plugins - UE Marketplace

When a project has been going on for a while, through several prototyping phases, a lot of assets get created but end up not being used and just take up space in your project.
This makes your project file size bigger, your packaged build bigger, and your loading time/shader compile times longer, for no reason.

The Assets Cleaner tool scans all the assets in a project and lists up all the ones that are unused (not referenced by anything else).
It then lets you select them in the browser, delete, manage them

This is a great way to keep your project clean, efficient, and your build size small.

AssetsCleanerThumb.JPG

Latest Version:
Version RC1 (requires UE 4.23)
This tool is now out of public testing, and will be sumitted to the marketplace in the next few days. Stay tuned!

Features:

  • Scan project assets and lists unused ones
  • Select items in content browser, or in Explorer
  • Edit items
  • Delete selected items
  • Move items to a different folder (to more easily find them later)
  • Filter by name, type or folder.
  • Resize and sort columns
  • Show current selection in Reference Viewer to double check they are not referenced by anything
  • Show current selection in Size Map, for a nice visual graph of the disk size occupied by these assets.

Demo Video:
AssetsCleanerPlay.JPG

If you have any feedback, issue, or feature you’d like to see please post a comment below.
Cheers

2 Likes

Sweet!
I was waiting some good widget done with the editor blueprints :slight_smile:
Any 4.22 version i could test?
I will not switch to 4.23 until official release and GPU lightmap available for that version.

Sorry no 4.22.
I tried to convert it, but it’s not really possible to downgrade blueprint to older versions easily.

New version available! v0.3
Lot of cool new features and so much better/safer managing of assets.

New Features:

  • Sort columns descending/ascending
  • Resize columns actually works (good enough)
  • Move button added, moves selected items to a different folder.
  • Ref Viewer button: Shows the Reference Viewer tool with the selected assets
  • Size Map button: Shows the Size Map tool with the selected assets
  • Missing plugin warning: A red box with a warning will appear if the project does not have the AssetManagerEditor plugin enabled (the ref viewer and size map are part of that plugin), it will also disable the buttons that require that plugin.

Changes:

  • Delete button now uses the editor’s built-in Delete Assets window, for safer delete and one last confirmation that your assets are not referenced before they get deleted.
  • Browse button now uses a custom C++ function, so the plugin does not depend on the EditorScriptingUtilities plugin anymore
  • The plugin does not require the EditorScriptingUtilities plugin to be enabled anymore, it will no longer fail to compile or show errors if it isn’t.
  • The plugin now requires the AssetManagerEditor plugin enabled to access some features, but it will still compile/work without it (features will be disabled)
  • Better UI, custom icons, and faster refreshing/filtering
  • Auto refresh on start
  • Auto refresh on move/delete
  • Filters now work in addition to the column sorting
  • A red warning message will appear if unused redirectors are detected, these can appear in some conditions (seems to happen when source control is setup with Git) and can lead to wrong data being displayed. The message also shows a How to Fix redirector help box.

Known Issues:

  • Column resizing is not great
  • If Show levels is on in the Settings, it’s not possible to use Move on a level. (delete works) It also only shows the World (Build Data) but never the levels.
  • Still can’t multi select using the mouse

This is my first time using C++, I had to for some of these features that were just not possible in BP.
It was pretty painful but it has been working pretty well in all my tests.

If you want to give it a try, see first post above for download link and installation instructions

Feedback is always welcome

That’s nice man! I’ll use it when i’ll pass to 4.23!

Great idea! But I got some problem with running Utility BP. When a do right mouse click on Asset Cleaner UBP Editor always shows an error “Failed to load assets”, although the Load Errors section in the Message log is empty. I use UE 4.23 Preview 7

Excellent stuff. Been looking for something like this for years but never bothered to write scripts. Big thanks!

Very nice! I’ll be sure to try it out once I move to 4.23 :slight_smile:

I just copied and ported my project to 4.23 and figured that this would be a good time to thin out some of the old files. I added it to a single project (not the engine) and your instructions worked fine. Starting the tool had the added benefit of cleaning up all of the redirectors. There were lots of unused files and it was useful to have a list of them all in one place for easy review. I can see why multi-select keeps coming up, it would be a time saving addition. Thanks for putting this tool together!

Very slick, Trying this out tonight.

Thanks everyone for trying this tool out.
I’ve got a new release coming soon with a lot of new features and some pretty decent UI improvements.
Hopefully that should address some of your issues.

The hope would be to release this tool on the marketplace eventually, once it’s tested enough

stay tuned

New version is out: 0.4
Get it here
See installation instructions in first post.

New features:

  • New column: Size, shows file size on disk + sort by size
  • Added “Find in Explorer” action
  • Added “Edit Asset” action (opens asset’s editor)
  • Better columns resizing
  • Tool disabled/greyed out when PIE is active
  • Better/proper icons
  • Changed UI to be right click context menu based, instead of buttons at the top (still available via the Manage button)

Check out this video of the tool in action

This is one of those things I wish for longer UE should have by itself. Thanks man.

This is fantastic! Not being mean or anything but the UE dev team should REALLY have given this to us a long, long time ago already, as a basic feature of the UE4 editor. Good job.

Thanks everyone for the feedback.

I have a new version ready, RC1, with a lot of exciting new features:

  • The tools now have its own Window Menu category and can be started from there (Window - Asset Tools - Assets Cleaner), instead of having to find the widget every time
  • I finally found a workaround hack for Multi selection. You can now use Ctrl/Shift click to select multiple items
  • I’ve removed all the tickboxes and added a** “Select all”** option on the right click menu
  • I’m also excluding levels and WorldBuildData from the list because they never return references, and cannot be interacted with (they’re a different type of asset)

AssetsCleanerRC1.jpg

This version won’t be available for testing though.

I am planning on submitting this tool to the marketplace very soon (after some more testing), so hopefully if all goes well you should all be able to grab it from the marketplace as soon as it’s approved.

I’ve also disabled the previous download links as they were only early test release and I won’t be able to support those anymore.

Thanks again for the support!

Updated to the released version of the 4.23, now everythig works well

Hey, Christoufu great tool!! Where can I download it?

It’s being submitted to the marketplace right now.
Stay tuned for an update real soon!

It’s been submitted !!
Keep an eye out
https://forums.unrealengine.com/unreal-engine/marketplace/1664818-assets-cleaner-project-cleaning-tool

What about all the assets, that are referenced at runtime only? I actually frequently like to create a bunch of assets and have my game load and iterate over them at runtime. they are never referenced anywhere though, at best, just by class.
I assume you cant do anything there, right?