Description

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.

Steps to Reproduce

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

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-121802 in the post.

0
Login to Vote

Duplicate
ComponentUE - Gameplay - Blueprint Runtime
Affects Versions4.265.0
CreatedAug 17, 2021
ResolvedAug 17, 2021
UpdatedAug 19, 2021
View Jira Issue