How to construct UEnum (or compile time check for referencing UEnum)

A solution if the enum value as string is of interest:

The enum is not queried at compile time, but at least it doesn’t rely on strings, so a typecheck is done: Conversion of Enum to String - #25 by Fulezi

Solution for display value:

FString displayName = UEnum::GetDisplayValueAsText(EMyEnum::EnumValue).ToString();
2 Likes