I have a class I want to add some Events to that are exposed to Blueprints. It looks something like this:
UCLASS(Blueprintable, BlueprintType)
class MONSTERHOCKEY_API APeriodManager : public AInfo
{
GENERATED_BODY()
...
public:
DECLARE_EVENT(APeriodManager, FPeriodClockPausedDelegate)
UPROPERTY(BlueprintAssignable, Category = "Period Manager Events")
FPeriodClockPausedDelegate onPeriodClockPausedDelegate; <--- line 54
};
I trimmed out all the irrelevant stuff. There’s a forum thread I was using as an example. I also tried the example in the docs.
They both produce the same compiler error:
2> C:/Coding/UE4/MonsterHockey/Source/MonsterHockey/PeriodManager.h(54) : Unrecognized type ‘FPeriodClockPausedDelegate’ - type must be a UCLASS, USTRUCT or UENUM
If I comment out the UPROPERTY line, it compiles, but then I can’t do anything with it from Blueprint land, as far as I’m aware.
Trying to use DECLARE_MULTICAST_DELEGATE instead produced the same result.
What am I doing wrong here?