UENUM(BlueprintType) //"BlueprintType" is essential to include
enum class EVictoryEnum : uint8
Running in PIE the String conversion works as expected (Dance, Rain, Song). However If you run on Android or Windows you get the code name instead of the display Name, (VE_Dance, VE_Rain, VE_Song)
So If I wanted to display string representation of an enumeration on the screen I need to write my own Enum To String Map and conversions myself? instead of relying on the automatic blueprint conversions “Enum To String”
The reason for this difference is because the meta data is stripped out of shipping builds, so the behavior you’re seeing here is expected. The DisplayName is mainly meant to help organize / reference the parts of the enum in the editor.
If you want to print what is set as the UMETA(DisplayName) then you would need to create your own way to do so, yes. Alternatively, you can rename the enum values in code to whatever name you would like displayed using the EnumToString node.
Thanks for the very fast response, of course enum names are restricted from having characters like spaces or conflicting with keywords so this mean writing my own conversions.
It would be nice if the “Enum To String” conversion had a tooltip or something explaining its behavior is different in debug mode vs deployment. While I understand the reasoning for it, its very confusing behavior for a developer. Especially since its an auto-conversion.
The Description for “Enum to String” is “Returns user friendly string for enumerator” I think that description is not accurate and should be updated as the string returned for the enumerator is not user friendly always.