Say I wanted to create an enum in C++, simple enough:
enum MyTestEnum
{
MTE_Test_1 = (1 << 0),
MTE_Test_2 = (1 << 1),
MTE_LAST = (1 << 31)
};
Now I want to expose this to Blueprints, so I change it a bit by following this tutorial:
UENUM(BlueprintType)
enum class MyTestEnum : uint8
{
MTE_Test_1 = (1 << 0) UMETA(DisplayName="Test 1"),
MTE_Test_2 = (1 << 1) UMETA(DisplayName="Test 2"),
MTE_LAST = (1 << 31) UMETA(Hidden)
};
This doesn’t compile. However removing the values from the enum compiles just fine. How can I assign a value to each entry in the enum?