Hey, I wondered how to create a toolbar plugin for PhAT in Unreal Engine 4.16.1.
I already created a LevelEditorPlugin like below this text.
For now I thought I have to replace the FLevelEditorModule with the FPhATModule but that class is in the private folder and has no header. I think it is a Plugin itself.
So how do I get the FPhATModule for adding toolbar extensions.
Thanks a lot.
Marcel
void FGraspExtenderModule::StartupModule()
{
// This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module
FGraspExtenderStyle::Initialize();
FGraspExtenderStyle::ReloadTextures();
FGraspExtenderCommands::Register();
PluginCommands = MakeShareable(new FUICommandList);
PluginCommands->MapAction(
FGraspExtenderCommands::Get().PluginAction,
FExecuteAction::CreateRaw(this, &FGraspExtenderModule::PluginButtonClicked),
FCanExecuteAction());
FLevelEditorModule& LevelEditorModule = FModuleManager::LoadModuleChecked<FLevelEditorModule>("LevelEditor");
{
TSharedPtr<FExtender> MenuExtender = MakeShareable(new FExtender());
MenuExtender->AddMenuExtension("WindowLayout", EExtensionHook::After, PluginCommands, FMenuExtensionDelegate::CreateRaw(this, &FGraspExtenderModule::AddMenuExtension));
LevelEditorModule.GetMenuExtensibilityManager()->AddExtender(MenuExtender);
}
{
TSharedPtr<FExtender> ToolbarExtender = MakeShareable(new FExtender);
ToolbarExtender->AddToolBarExtension("Settings", EExtensionHook::After, PluginCommands, FToolBarExtensionDelegate::CreateRaw(this, &FGraspExtenderModule::AddToolbarExtension));
LevelEditorModule.GetToolBarExtensibilityManager()->AddExtender(ToolbarExtender);
}
}