Skip to content

Instantly share code, notes, and snippets.

View pasotee's full-sized avatar
🦅

Oprea Alexandru pasotee

🦅
View GitHub Profile
@pasotee
pasotee / Unreal Engine - Extend blueprint editor toolbar
Last active February 2, 2023 20:17
Snippet to add your own button inside Unreal's blueprint editor toolbar
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"));
@pasotee
pasotee / Unreal Engine - Extend main toolbar
Last active February 2, 2023 20:17
Snippet to add your own actions inside Unreal's main toolbar
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(