Download

Slate: Inserting a new item into the build menu

We have created the boilerplate code to insert a new menu item to the main ‘File’ menu - this all works perfectly and calls the appropriate delegate.

However, we wish to put this in the ‘Build’ menu from the tool bar after the visibility section, so we request to place it after “LevelEditorVisibility”. Nothing appears in the build menu and our menu builder code does not get called. What are we doing wrong?

Cheers
John

Sample code:

[FONT=courier new] TSharedRef<FExtender> Extender( new FExtender() );

Extender-&gt;AddMenuExtension(

"FileActors",
EExtensionHook::After,
FGPEGBuilderCommandsBase::Get().GPEGBuilderActions.ToSharedRef(),
FMenuExtensionDelegate::CreateStatic( &FGPEGBuilderCommands::GPEGBuilderMenuBuilder ) );

FLevelEditorModule& LevelEditorModule = FModuleManager::Get().LoadModuleChecked&lt;FLevelEditorModule&gt;( "LevelEditor" );
LevelEditorModule.GetMenuExtensibilityManager()-&gt;AddExtender( Extender );

Inserting at [FONT=courier new]“FileActors” works fine, inserting at [FONT=courier new]“LevelEditorVisibility” does nothing.

Cheers
John