This is because the metadata is editor only and will be stripped in a cooked build. We should make the behavior of the to string function consistent between PIE and a cooked build.
1. Add this custom enum to any native blueprint
UENUM() enum class EBenTestEnum : uint8 { First = 0 UMETA(DisplayName = "DISPLAY NAME FIRST"), Second = 1 UMETA(DisplayName = "DISPLAY NAME SECOND"), Third = 2 UMETA(DisplayName = "DISPLAY NAME THIRD"), Fourth = 3 UMETA(DisplayName = "DISPLAY NAME FOURTH") };
2. In a blueprint add the above enum as a variable and call the "Enum to String" function on it, printing the results to the screen
3. PIE, noticing that the DisplayName metadata is used for the enum
4. Build/Cook/Run the game
5. Notice that in a cooked build the DisplayName is not used
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-121802 in the post.
0 |
Component | UE - Gameplay - Blueprint Runtime |
---|---|
Affects Versions | 4.26, 5.0 |
Created | Aug 17, 2021 |
---|---|
Resolved | Aug 17, 2021 |
Updated | Aug 19, 2021 |