ue4 c++ enum variable declaration
// Enum declaration in a header file (MyEnum.h)
#pragma once
UENUM(BlueprintType)
enum class EMyEnum : uint8
{
Value1 UMETA(DisplayName = "First Value"),
Value2 UMETA(DisplayName = "Second Value"),
Value3 UMETA(DisplayName = "Third Value")
};
// Enum variable declaration in a source file (MyClass.cpp)
#include "MyEnum.h"
// Inside a class or function
EMyEnum MyVariable = EMyEnum::Value1;