Cannot Create Data Table From C++ Struct

Currently I am trying to create another data table based off of a struct created in one of my C++ actor classes. However, when I select to create a new data table, I only get the default option “Gameplay Row” option. The code compiles without issue.

Included the .h file containing the struct in question.

#pragma once

#include "Interactable.h"
#include "EngineGlobals.h"
#include "Runtime/Engine/Classes/Engine/Engine.h"
#include "Engine/DataTable.h"
#include "CraftingStation.generated.h"

/**
 * 
 */


USTRUCT(BlueprintType)
struct FCraftingInfo
{
	GENERATED_BODY()

public:

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		FName ComponentID;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		FName ProductID;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		bool bDestroyComponentA;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		bool bDestroyComponentB;



};

USTRUCT(BlueprintType)
struct FCraftedItem
{
	GENERATED_BODY()

public:


	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		FName ItemID;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		FName Name;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		FText Action;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		FText Description;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		bool CanBePlaced;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		int32 Value;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		UTexture2D* Thumbnail;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		TArray<FCraftingInfo> CraftingCombinations;


};





UCLASS()
class CRAFTINGGAME_API ACraftingStation : public AInteractable
{
	GENERATED_BODY()

public:
	ACraftingStation();

	UPROPERTY(EditAnywhere)
		UStaticMeshComponent* StationMesh;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		FName ItemID;

protected:




};
1 Like

Hi.

Your struct need to inherit FTableRowBase.

Example:

USTRUCT(Blueprintable)
struct FYourDataTableStruct : public FTableRowBase

More info here:
Wiki about using data tables

5 Likes

That was it, thank you kindly.

Thanks.
That did the trick for me too!