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:
- In editor, go to Edit - Plugins and enable the Editor Scripting Utilities plugin and restart
- 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/…
- 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.
- Now go to Window - Editor Utility Widgets - UnusedAssetsViewer to open the tool
- The window can be resized and docked wherever you want
HOW TO USE
- First click “CHECK” to get a list of assets, you can then double click an item to see it in the content browser
- 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
- 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.