This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void FYourModuleModule::StartupModule() | |
| { | |
| UToolMenu* ToolBarMenu = UToolMenus::Get()->ExtendMenu("AssetEditor.BlueprintEditor.ToolBar"); | |
| FToolMenuSection& Section = ToolBarMenu->AddSection("MySection", INVTEXT("My Section Name")); | |
| Section.AddEntry(FToolMenuEntry::InitToolBarButton( | |
| FName("MyAction"), | |
| FUIAction(FExecuteAction::CreateLambda( | |
| []() | |
| { | |
| UE_LOG(LogTemp, Warning, TEXT("MyAction was executed")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void FYourModuleModule::StartupModule() | |
| { | |
| UToolMenu* MainTabFileMenu = UToolMenus::Get()->RegisterMenu("MainFrame.MainTabMenu.File", "MainFrame.MainMenu.File"); | |
| FToolMenuSection& Section = MainTabFileMenu->AddSection("MySection", INVTEXT("My Section Name")); | |
| Section.AddMenuEntry( | |
| FName("MyAction"), | |
| INVTEXT("My Action Name"), | |
| INVTEXT("My Action Tooltip"), | |
| FSlateIcon(FName("OutputLogStyle"), "Log.TabIcon"), | |
| FUIAction(FExecuteAction::CreateLambda( |