When a BlueprintImplementableEvent that takes a custom enum as a parameter is overridden in a Blueprint, it will throw a compile error. The compile error states that the event cannot be overridden because it was declared with a different signature in a parent class. Specifying that the enum is of type uint8 gets past the issue.
This issue only occurs if the BlueprintImplementableEvent has a return type. If the return type is void, the Blueprint compiles without any errors.
REGRESSION:
Yes. This worked fine in 4.13.2. This may be the result of a change in 4.14 where TEnumAsByte is no longer used in generated code.
UENUM() enum class EMyEventType { Clicked, ClickReleased, };
UFUNCTION(BlueprintImplementableEvent, Category = MyEvent, meta = (DisplayName = "HandleMyEvent"))
bool ReceiveMyEvent(EMyEventType InEventType);
RESULT:
The Blueprint editor shows a Compile error that states: "BlueprintEditorCompileResults:Error: Error Cannot override 'MyActor::ReceiveMyEvent' at HandleMyEvent which was declared in a parent with a different signature"
EXPECTED:
The Blueprint compiles successfully.
WORKAROUND:
Specify that the enum is of type uint8 (enum class EMyEventType : uint8).
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-42479 in the post.
0 |
Component | UE - Gameplay - Blueprint |
---|---|
Affects Versions | 4.14.3, 4.16 |
Target Fix | 4.16 |
Fix Commit | 3354249 |
---|---|
Main Commit | 3358685 |
Created | Mar 1, 2017 |
---|---|
Resolved | Mar 20, 2017 |
Updated | Apr 27, 2018 |