21,怪物信息结构体换为c++
类必须继承自FTableRowBase因为还要从这里建表#pragma once#include “CoreMinimal.h”#include “PaperFlipbook.h”#include “Engine/DataTable.h”#include “MonsterInfor.generated.h”USTRUCT(BlueprintType)struct FMonsterInformation : public FTableRowBase{GENERATED_BODY()UPROPERTY(EditAnywhere, BlueprintReadWrite, Category Monster) int32 ID; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category Monster) UPaperFlipbook* FlipBook; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category Monster) float Atk; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category Monster) float MaxHP; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category Monster) float SPD; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category Monster) float DropTreasureRate; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category Monster) float Mass; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category Monster) float MaxTime; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category Monster) int32 DropExpTypeA; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category Monster) int32 DropExpTypeB; FMonsterInformation() { ID 0; FlipBook nullptr; Atk 0.0; MaxHP 0.0; SPD 0.0f; DropTreasureRate 0.0; Mass 0.0f; MaxTime 0.0f; DropExpTypeA 0; DropExpTypeB 0; }};新建一个表将原表导出.csv后再导入到新表替换掉蓝图中相关使用的地方暂时不改成c