How can I output the value of an Enum to a log?

#There Is a Way

I wrote a Wiki tutorial on it here:

Original code was created with help of Marc Audy

FText is Localized

can use .ToString() to get it to FString if you want

FText GetVictoryEnumAsString(EVictoryEnum::Type EnumValue)
{
  const UEnum* EnumPtr = FindObject<UEnum>(ANY_PACKAGE, TEXT("EVictoryEnum"), true);
  if(!EnumPtr) return NSLOCTEXT("Invalid","Invalid","Invalid");
 
  return EnumPtr->GetDisplayNameText(EnumValue);
}