Description

Converting a C++ enum to a string should be a consistent result, however when running in the editor it returns the display-name value instead of the index value. This prevents C++ UENUMs from being used in any meaningful way, such as part of a path.

Steps to Reproduce

Repro from Attached Project.

1.Download the attached Zip File

2.Press PIE, note the display name.

3. Run the Game in Stand Alone, note the display name.

4. Package the Project on Windows 64-bit, run the Exe.

Expected: Both Editor and Project should display 

Test1: Passed(Value is "TestMe1" Should be "TestMe1")

Test2: Passed(Value is "TestMe2" Should be "TestMe2")

Result:

Test1: Failed(Value is "TestMe1 Failed" Should be "TestMe1")

Test2: Failed(Value is "Test Me 2" Should be "TestMe2")

 

Repro From Creation:

Create the following UENUM:

UENUM(BlueprintType) 
enum class ELanguage : uint8 
{ 

   EnglishUS UMETA(DisplayName = "English-US") 
}

 

1.Build and load project in editor.

2.Make a blueprint to convert the enum value to string and output it. Note that it shows the display name.

3.Deploy the project to a device and run it again. Device will output the index value.

 

Expected: 

Both editor and device should output "EnglishUS"

Result: 

Editor outputs "English-US"

Device outputs "EnglishUS"

 

Have Comments or More Details?

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

0
Login to Vote

Duplicate
ComponentUE - Gameplay
Affects Versions4.234.244.25
CreatedMar 5, 2020
ResolvedMar 5, 2020
UpdatedMar 5, 2020