I’m trying to create a c++ data table using a c++ struct(USTRUCT inheriting from FTableRowBase) and wanted to know if and how I could implement the data table(in c++) using the struct I created in the same class. This is for an inventory system.
DataTable.h
USTRUCT()
struct ItemStructure : public FTableRowBase
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadOnly)
FText DisplayName;
UPROPERTY(EditAnywhere, BlueprintReadOnly)
FText Description;
UPROPERTY(EditAnywhere, BlueprintReadOnly)
UTexture2D Thumbnail;
UPROPERTY(EditAnywhere, BlueprintReadOnly)
UStaticMesh Mesh;
UPROPERTY(EditAnywhere, BlueprintReadOnly)
bool Stackable;
}
UCLASS()
class CPP_TEST_B_API UItemDataTable : public UDataTable
{
GENERATED_BODY()
};
And thanks in advance!