I’m attempting to modify WorldBrowserModule.h to include some extra customization hooks, similar to the following:
class WORLDBROWSER_API FCustomizationHooks
{
public:
DECLARE_DELEGATE(FSomeDelegate);
static FSomeDelegate OnEvent;
};
The OnEvent is then defined in the corresponding WorldBrowserModule.cpp:
FCustomizationHooks::FSomeDelegate FCustomizationHooks::OnEvent;
However, when building I get the following error:
1>D:\RJ\UnrealEngine\Engine\Source\Editor/WorldBrowser/Public/WorldBrowserModule.h(84): error C2079: ‘FCustomizationHooks’ uses undefined class ‘WORLDBROWSER_API’
Of course, if I remove the WORLDBROWSER_API, the WorldBrowser module itself builds, but then I get (expected) linker errors attempting to actually bind to the delegate due to undefined external symbols.
I’ve already checked out 'xxx' uses undefined class 'WORLDBROWSER_API' error - Plugins - Epic Developer Community Forums, however it is not relevant.
Why is WORLDBROWSER_API undefined in this context? What is the correct method to expose public functionality outside of adding virtual methods to the FWorldBrowserModule interface to the WorldBrowser module?