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
Request a info about UE-127172 bug tracker
How to delete some elements correctly when deleting an array loop?
How do I set a material as a post-processing material?
Why does the REMOVE method of map container remove elements have memory leaks?
How does TextureRenderTarget2D get TArray<uint8> type data?
What is the difference between Camera and CineCamera?
What controls of umg have mouse wheel events in UE4.27?
How to assign a value to a member of UMG's UMaterialInterface pointer type in C++?
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 |