UE4 4.25 C++创建表格

Posted on 2021-01-17 16:00  Max404  阅读(218)  评论(0编辑  收藏  举报

头文件

#include "Engine/DataTable.h"

//按钮UI表格

USTRUCT(BlueprintType,Blueprintable)
struct  FButtonWidgetAttr:public FTableRowBase{

    GENERATED_BODY()

public:

    //构造函数
    FButtonWidgetAttr() {};

    UPROPERTY(EditAnywhere, BlueprintReadWrite)
        FName ButtonName;

    UPROPERTY(EditAnywhere, BlueprintReadWrite)
        FVector2D Szie;

    UPROPERTY(EditAnywhere, BlueprintReadWrite)
        int FontSize;

    UPROPERTY(EditAnywhere, BlueprintReadWrite)
        class UTexture2D * Normal;

    UPROPERTY(EditAnywhere, BlueprintReadWrite)
        class UTexture2D* Hovered;

    UPROPERTY(EditAnywhere, BlueprintReadWrite)
        class UTexture2D* Pressed;
};

 

UCLASS()
class BACKPACKCPP_API UInventorySystemType : public UObject
{
    GENERATED_BODY()
};