The making of Unused Assets viewer editor tool in BP

I’m going to be documenting my progress here making a Unused Assets viewer with the new Editor Widget BP.

The goal of this tool is to allow content makers to quickly get a view of all assets in the current project that are unused (not referenced by anything).
It won’t be a 100% representative list, but should at list give people a good starting point when trying to clean up their projects.

The goal of this exercise is to get familiar with editor widget BP and editor scripting, while hopefully helping out people who are trying to learn about it.

Latest Progress:

  • Using EditorScriptingUtilities:

  • get list of all assets in projects

  • check if they’re not referenced

  • get their name/path/class

  • make a list of it.

  • Using UMG :

  • have a basic list layout (using ListView for better instance handling)

  • handle (multiple) selection

  • Get buttons for actions (find in browser and select all/none)

  • handle style for selected/hovered etc…

  • Back to EditorScriptingUtilities:

  • Select in content browser the objects selected in the tool

  • Select in Content browser object being double clicked.

  • Plugins

  • Packaged the tool into a plugin for distribution

[HR][/HR]Latest version:

Available as a plugin: UnusedAssetsViewer.zip

IMPORTANT NOTES:

  • This plugin requires the EditorScripting Utilities plugin to be enabled (won’t work without it)
  • This has not been tested yet, no guarantee

INSTALLATION:

  1. In editor, go to Edit - Plugins and e​​​​​nable the Editor Scripting Utilities plugin and restart
    1_pluginscripting.jpg
  2. Unzip the file, Copy the **UnusedAssetViewer **directory into your project in the Content/Plugins folder (create the Plugins folder if it doesn’t exist)
    You should get Content/Plugins/UnusedAssetViewer/…
    5.dir.jpg
  3. In the editor, go Edit - Plugins, scroll to Installed, and in Editor Utilities, enable Unused Asset Viewer
    If you can’t see it in the list, restart the editor.
    2.plugininstalled.jpg
  4. Now go to Window - Editor Utility Widgets - UnusedAssetsViewer to open the tool
    3.window.jpg
  5. The window can be resized and docked wherever you want

HOW TO USE

  1. First click “CHECK” to get a list of assets, you can then double click an item to see it in the content browser
  2. You can select multiple items, (buggy only works using shift + up or down) and then click Find in Browser to select them all in the content browser
  3. Select None/All can be used to clear you selection.

Known issues

  • resizing the window too narrow will have the text overlap (there’s no real “column” in this UI)
  • Multi selection doesn’t work with the mouse (ctrl + click, shift + click) (only doing Shift + up/down on keyboard does it). Bug has been reported to epic.

Any feedback or issues, please comment here.

Thank you.

Wow, I’ve been waiting for a tool like this for years, since migrating levels to new empty project seems to be a long non-sense way to clean the project from unused assets, I think if this works smoothly it will be one of the top tools on everyone using UE4. I will be testing this out and give you my feedback :slight_smile: Thanks a lot man.

Hey all
This is still alive, it’s got a lot of improvements, and i’ve changed its name to Assets Cleaner

Check out the Work in progress section for the new version of this tool

https://forums.unrealengine.com/community/work-in-progress/1656417-assets-cleaner-a-tool-to-manage-unused-assets

Thanks