UEnum::GetDisplayNameText missing from Shipping

For Win64 builds with Debug, Development, or Shipping the UEnum::GetDisplayNameText function is missing. However it is fine for Development Editor and DebugGame Editor.

Is this by design?

Should the function be available in all builds?

Thank you.

Hey -

In the Enum.cpp file, the FText UEnum::GetDisplayNameText(int32 NameIndex) const function is wrapped inside an #if WITH_EDITOR. This would indicate that this is by design and only available in Editor configurations.

Cheers

Thank you .

Would you know how to get the localized text from enums? If you take a look at the end of the below thread you’ll understand what I mean:

I can gather the UMETA data, translate it, and build the game. However, at runtime I cannot display the localized string. ENUM’s return the native version only.

Unfortunately meta-data doesn’t exist in non-editor builds, so display names for enums used outside of the editor need to be done manually.

Thank you again . That’s good to know.

So what about ‘Physical Surface’ names then?

They also seems to be UENUM and in shipping version GetSurfaceType printed as string shows just the default name like SurfaceType1, instead of ‘Sand’ in editor. Seems missleading to define this in settings if they cannot be used in final build. ?

Hey -

Can you provide the setup for the behavior you’re seeing? With the setup shown below I do not get any message printed when the project is packaged for shipping.

I don’t know how to get PrintString logging working in shipping build so I used DrawDebugString in the world at the hit location.

My solution to the missing enum names was to use a switch that each set the names I wanted. In my case like setting: You are on ‘Metal’ to our footstep system.