Download

Adding custom metadata to a UENUM?

I’m wondering if there’s a way for me to add custom data to a UENUM.

Something like this:



UENUM(BlueprintType)
enum class EntityType : uint8 {
    None = 0          UMETA(DisplayName = "None",        WebID = "None"),
    Player = 1        UMETA(DisplayName = "Player",      WebID = "Player_01"),
    NPC = 2            UMETA(DisplayName = "NPC",        WebID = "NonPlayer"),
    Monster = 2        UMETA(DisplayName = "Monster",    WebID = "Mob")
};

I’ve tried looping through the UEnum indices and checking HasMetaData to determine if the metadata “WebID” exists but it is always returning false.
Is there a way to implement something like this in UE4?