Content Browser

Credits:

  • Thanks to mklabs for his GAS Companion plugin, his content browser extension code is the original reason I pursued this system. Although no GAS Companion code is used in this plugin.

  • Some of the code is borrowed from the open-source VoxelCore plugin.

OmniToolbox allows any C++ class to be easily added to the content browser's context menu by simply adding the I_AssetDetails interface and returning true for AppearsInContextMenu.

Your asset will now automatically get a UOmniAssetDefinition and UOmniFactory to handle displaying it in the context menu and to create the asset.

This only supports basic assets (data assets and normal blueprint types)

The interface provides some utilities, such as enabling a class picker

When overriding AppearsInContextMenu, I recommend doing it like this:

virtual bool AppearsInContextMenu_Implementation() const override
{
    return GetClass() == UEntityAbility::StaticClass();
}

Handling it like this will prevent child classes from also attempting to appear in the context menu.

Blueprint support

To allow blueprints to appear in the content browsers context menu, a little bit more work is required:

  1. Go to your editor settings and find OmniToolbox and add your blueprint to Context Menu Entries

    1. The blueprint must implement I_AssetDetails to appear

  2. Restart the editor.

    1. The code that handles this system is only executed once and that is when the plugin is started.

Last updated