I am currently working on a rather complex Plugin, the project already has a main widget class and a couple of additional classes showing up in the editor menu, spawning their own custom tabs on click along with their functionality and settings.
However, there is a class that requires a few SDecoratedEnumCombo widgets on its Tab, and after hours of research and digging through the source code for samples, here is the function that is supposed to create a sample SDecoratedEnumCombo.
TSharedRef<SWidget> SATSWidgetStats::CreateMenuExtra(FString TargetKey) {
FMenuBuilder ExtraMenuBuilder(true, NULL);
TArray<SDecoratedEnumCombo<FATSGameplayEffect>::FComboOption> Info;
ExtraMenuBuilder.AddWidget(
SNew(SDecoratedEnumCombo<FATSGameplayEffect>, MoveTemp(Info)),
FText::FromString(TEXT("GameplayEffect"))
);
return ExtraMenuBuilder.MakeWidget();
}
And I am including the following headers in this class
/*
/// .cpp includes
*/
#include "AttributeSystemPrivatePCH.h"
#include "Editor/HardwareTargeting/Public/SDecoratedEnumCombo.h"
#include "CoreMisc.h"
#include "Paths.h"
#include "AttributeSystem.h"
#include "SATSWidgetStats.h"
/*
/// .h includes
*/
#include "Archive.h"
#include "FileManager.h"
#include "SlateBasics.h"
However, I get the following error on Build.
2>Module.AttributeSystem.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class ISlateStyle & __cdecl FEditorStyle::Get(void)" (__imp_?Get@FEditorStyle@@SAAEAVISlateStyle@@XZ) referenced in function "public: void __cdecl SDecoratedEnumCombo<enum FATSGameplayEffect>::Construct(struct SDecoratedEnumCombo<enum FATSGameplayEffect>::FArguments const &,class TArray<struct SDecoratedEnumCombo<enum FATSGameplayEffect>::FComboOption,class FDefaultAllocator>)" (?Construct@?$SDecoratedEnumCombo@W4FATSGameplayEffect@@@@QEAAXAEBUFArguments@1@V?$TArray@UFComboOption@?$SDecoratedEnumCombo@W4FATSGameplayEffect@@@@VFDefaultAllocator@@@@@Z)
2>C:\Users\\Documents\Unreal Projects\Prototypes\PluginLibrary\Plugins\AttributeSystem\Binaries\Win64\UE4Editor-AttributeSystem.dll : fatal error LNK1120: 1 unresolved externals
Am I not creating the EnumCombo correctly? Am I missing something? I’d really appreciate any advice or hints.
Thank you.