I’ve been trying to pick apart Data Driven Gameplay Elements | Unreal Engine Documentation and make my own example to be sure I understand the process, and I’m stuck on one step: I’ve made some arbitrary enum EMyEnum to hold a unique value, and a struct to hold each row of data from my table:
USTRUCT(BlueprintType)
struct FMyEnumDataRow : public FTableRowBase
{
GENERATED_USTRUCT_BODY()
UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
EMyEnum EnumValue;
};
I’ve already imported my CSV, used my struct as the data table row type, and verified that the data imported correctly by opening the data table (which I just named MyEnumTestDT) in the editor and viewing its contents.
Where I’m stuck is the next step, namely obtaining a reference to MyEnumTestDT in code so I can run searches across it. Once I have that reference (presumably as a UDataTable), I know I can find data by doing something like:
int8 rowID;
FMyEnumDataRow = UDataTable->FindRow<rowID>
However, that’s all predicated on actually finding a reference to the data table in the first place. So how, given the presence of some UDataTable MyEnumTestDT in the content folder, do I obtain a reference to that data table in code?