Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2015
    Posts
    1

    Question Problems with UE4 Plugin tutorial and Version 4.6.1

    Hi,

    I've been following the Creating Plugins with Unreal 4 tutorial series, using UE4 version 4.6.1, with no problems until video 4 "Adding Buttons". With the same code as them, I do not get the Cool Plugin Window option appearing in the Window dropdown menu.

    I've looked around and it seems to be an issue with how later versions handle this task. Any help with updating the code would be appreciated and will this affect being able to follow along in later videos?

    Here is Module.cpp from the tutorial series

    Code:
    #include "CoolPluginPch.h"
    #include "Module.h"
    
    IMPLEMENT_MODULE(Module, CoolPlugin);
    DEFINE_LOG_CATEGORY(ModuleLog)
    
    #define LOCTEXT_NAMESPACE "CoolPlugin"
    
    Module::Module()
    {
    
    }
    
    void Module::StartupModule()
    {
    	TSharedPtr<FExtender> extender = MakeShareable(new FExtender);
    	extender->AddMenuExtension(
    		"WindowLocalTabSpawners",
    		EExtensionHook::After,
    		NULL,
    		FMenuExtensionDelegate::CreateRaw(this, &Module::CreateWindowMenu));
    
    	FLevelEditorModule& levelEditor = FModuleManager::LoadModuleChecked<FLevelEditorModule>("LevelEditor");
    	levelEditor.GetMenuExtensibilityManager()->AddExtender(extender);
    }
    
    void Module::ShutdownModule()
    {
    
    }
    
    void Module::CreateWindowMenu(FMenuBuilder& menuBuilder)
    {
    	menuBuilder.AddMenuEntry(
    		LOCTEXT("OpenWindow", "Cool Plugin Window"),
    		LOCTEXT("OpenWindowTooltip", "Opens the Cool Plugin window"),
    		FSlateIcon(),
    		FUIAction(FExecuteAction::CreateRaw(this, &Module::OpenPluginWindow)));
    }
    
    void Module::OpenPluginWindow()
    {
    	UE_LOG(ModuleLog, Warning, TEXT("Hello, World!"));
    }

  2. #2
    Join Date
    Feb 2015
    Posts
    1
    Quote Originally Posted by Stewsday View Post
    Hi,

    I've been following the Creating Plugins with Unreal 4 tutorial series, using UE4 version 4.6.1, with no problems until video 4 "Adding Buttons". With the same code as them, I do not get the Cool Plugin Window option appearing in the Window dropdown menu.

    I've looked around and it seems to be an issue with how later versions handle this task. Any help with updating the code would be appreciated and will this affect being able to follow along in later videos?

    Here is Module.cpp from the tutorial series

    Code:
    #include "CoolPluginPch.h"
    #include "Module.h"
    
    IMPLEMENT_MODULE(Module, CoolPlugin);
    DEFINE_LOG_CATEGORY(ModuleLog)
    
    #define LOCTEXT_NAMESPACE "CoolPlugin"
    
    Module::Module()
    {
    
    }
    
    void Module::StartupModule()
    {
    	TSharedPtr<FExtender> extender = MakeShareable(new FExtender);
    	extender->AddMenuExtension(
    		"WindowLocalTabSpawners",
    		EExtensionHook::After,
    		NULL,
    		FMenuExtensionDelegate::CreateRaw(this, &Module::CreateWindowMenu));
    
    	FLevelEditorModule& levelEditor = FModuleManager::LoadModuleChecked<FLevelEditorModule>("LevelEditor");
    	levelEditor.GetMenuExtensibilityManager()->AddExtender(extender);
    }
    
    void Module::ShutdownModule()
    {
    
    }
    
    void Module::CreateWindowMenu(FMenuBuilder& menuBuilder)
    {
    	menuBuilder.AddMenuEntry(
    		LOCTEXT("OpenWindow", "Cool Plugin Window"),
    		LOCTEXT("OpenWindowTooltip", "Opens the Cool Plugin window"),
    		FSlateIcon(),
    		FUIAction(FExecuteAction::CreateRaw(this, &Module::OpenPluginWindow)));
    }
    
    void Module::OpenPluginWindow()
    {
    	UE_LOG(ModuleLog, Warning, TEXT("Hello, World!"));
    }
    It's because the Unreal Engine 4 Pipeline changes every version and the dropdown menus tend to change a lot. You should change "WindowLocalTabSpawners" to "General". Then it will show up in the Window tab. To know what section to place it under, simply enable a checkbox under: Edit-> Editor Preferences -> Miscellaneous -> Display UIExtension Points.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •