Ue4_UEnum枚举类型

一.Ue4中枚举类型的两种定义方式

//写法一
UENUM(BlueprintType)
enum EColor_1
{
    RED,
    BLUE,
    YELLOW
};


//写法二
UENUM(BlueprintType)
enum class EColor_2 :uint8
{
    RED,
    BLUE,
    YELLOW
};

BlueprintType 修饰符

此类可作为蓝图中的一种变量类型使用

2.在actor创建一个枚举类型

 

posted on 2021-06-24 00:28  Animer  阅读(1378)  评论(0编辑  收藏  举报