Algosyntax Logo

UE5 Converting Enums to FString In C++

Sometimes you may need to convert an enum to a string without using switch or if else blocks. Here’s a generic way of converting any UEnum to FString:

enum class MyEnum : uint8
	None			 UMETA(DisplayName = "(none)"),
	Quarter			 UMETA(DisplayName = "1/4")

auto MyEnumValue=MyEnum::Quarter;

//This will get the "DisplayName" of the Enum. Eg "1/4)

//This gets the Name of the enum, eg "Quarter"


Welcome to our audio and rhythm plugins collection! With MidiEngine, you can easily import MIDI files and use midi events to create engaging rhythm gameplay or enhance your videos.


Plugin that helps add UMG Widgets to Level Sequences for Text Layers, Movie Titles, 2D layers and more… directly within sequencer. Cross platform.


Let your end users Split And Resize The UI at runtime. Perfect for both games and Applications.

Consider investing in some of our plugins. They might save you some time.  Also helps supports these tutorials.

Instantly get access to our plugins like Blender Curves Importer and UMG Cinematics and more when  you support us on Patreon!

 Join Us On Discord For More Daily Tips!