Hello everyone, I’m adding this here in case anyone has the same problem in the future.
Long story short: I needed a FSlateColor](FSlateColor | Unreal Engine Documentation) as a parameter for a function and as a class member (for use with SetColorAndOpacity on a simple UTextBlock widget),
Included the necessary Styling/SlateColor.h
But when compiling (4.24) I was met with linker errors:
[FONT=courier new]error LNK2019: unresolved external symbol “__declspec(dllimport) public: __cdecl FSlateColor::~FSlateColor(void)” (_imp??1FSlateColor@@QEAA@XZ) referenced in function “public: __cdecl TArray<struct FSlateColor,class TSizedDefaultAllocator<32> >::~TArray<struct FSlateColor,class TSizedDefaultAllocator<32> >(void)” (??1?$TArray@UFSlateColor@@anonymous_user_e71e0d8a?$TSizedDefaultAllocator@$0CA@@@@@QEAA@XZ)
Which was strange since this does not seem to always be an issue, maybe something to do with conversion between FSlateColor and FLinearColor …?
I fixed it by adding the SlateCore module to Build.cs
Now my question is, why would this be needed? Simply including the header should be enough (and really, the SetColor function should take a FLinearColor, or simply four 0-255 floats)