How to add new entry to Components Context Menu ?
I Tried using
void MyTools::RegisterMenus()
{
UToolMenu* Menu = UToolMenus::Get()->ExtendMenu(“Kismet.SubobjectEditorContextMenu”);
FToolMenuSection& Section = Menu->FindOrAddSection(“EditComponent”);
FToolMenuEntry& Entry = Section.AddDynamicEntry(“SomeEntryName”, FNewToolMenuSectionDelegate::CreateLambda((FToolMenuSection& InSection)
{
ULevelEditorContextMenuContext* Context = InSection.FindContext();
if (Context)
{
FToolUIActionChoice LockAction(FExecuteAction::CreateLambda(Context
{
UE_LOG(LogTemp, Warning, TEXT("Do sth "));
}));
InSection.AddEntry(FToolMenuEntry::InitMenuEntry(FName("MyEntryName"), FText::FromString("MyEntryName Tooltip"), FText::FromString("MyEntryName tooltip msg"), FSlateIcon(), LockAction)); //FSlateIcon(FMyStyle::Get().GetStyleSetName(), "MyIconName")
}
}));
}
but with no luck.
I have seen that entries are created here FComponentEditorUtils::FillComponentContextMenuOptions .
Is it possible to extend that menu window with my own entries ?
Best
