Edit: THIRD attempt at making this question modern-code compatible, which is kind of damning to the Unreal system in general, but anyway:
I’m trying to build an editor plugin and I’m getting build errors. The project is in a Game/Plugins subfolder rather than an engine subfolder, but from what I can glean from the docs and example projects, this should be fine.
I assumed, based on browsing other projects, that I could do something like this:
#include "MyModulePrivatePCH.h"
#include "SlateBasics.h"
void FMyModule::StartupModule()
{
FGlobalTabmanager::Get()->RegisterTabSpawner(FName(TEXT("LevelEditor")), FOnSpawnTab::CreateRaw( this, &FMyModule::Show ) )
.SetDisplayName( NSLOCTEXT("MyModule", "MyModuleTab", "My Module") );
}
TSharedRef<SDockTab> FMyModule::Show(const FSpawnTabArgs& SpawnTabArgs)
{
//create a tab structure
}
My build file includes the relevant modules:
public class MyModule : ModuleRules
{
public MyModule(TargetInfo Target)
{
PrivateIncludePaths.AddRange(new string[]{"MyModule/Private"});
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });
PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
}
}
I’m getting these errors now:
Runtime/SlateCore/Public/Widgets/DeclarativeSyntaxSupport.h:1064:53: error: incomplete type ‘SDockTab’ named in nested name specifier
/Users/mikeb/repos/UnrealDemo/Plugins/MyModule/Source/MyModule/Private/MyModule.cpp:32:17: error: incomplete type ‘SDockTab’ named in nested name specifier
/Users/mikeb/repos/UnrealDemo/Plugins/MyModule/Source/MyModule/Private/MyModule.cpp:32:35: error: incomplete type ‘ETabRole’ named in nested name specifier
Runtime/SlateCore/Public/Widgets/DeclarativeSyntaxSupport.h:1021:10: error: member access into incomplete type ‘SDockTab’
Runtime/SlateCore/Public/Widgets/DeclarativeSyntaxSupport.h:985:29: error: allocation of incomplete type ‘SDockTab’
I’m trying to compile with Xcode 8.1 on OSX Sierra. Anyone faced this before? Any idea why the build would be throwing this back at me?