UDataTable functionality for packaged builds

HEy, it’s me again ^^

So I just had an error that pointed out that most, if not all functionality of the UDataTable class is editor only. soooo… that sucks big time. I have a neat lil function that cracks up my table and formats it in a data structure I can actually use in the game.

My point of interest is the TArray<TArray<FString>> TableRaw = MyUDataTable->GetTableData(); section of the code.

Is there any other way to get the raw table to format it the way I want? Am I missing some obvious stuff?
The blueprint node “GetDataTableRow” is suboptimal for my purposes, cuz it would end up in BP Spaghetti plus I don’t want the overhead.

PS: There is no indication in the documentation that it’s editor only, btw. makes me wonder what else is O.o

Maybe I should have formulated an actual question. ^^
I have a DataTable Asset. In that Table is a column to destinguish chunks of data (simple int). How would you read out the Table and sort it (get me all Rows with (int)2 in column 2) without the use of UDataTable::GetTableData() or Blueprints?

Not by default. Some DataTable data isn’t packaged with the game, along with a few functions.

The way to access Data Table rows is usually with FindRow<T>(). You can iterate rows yourself by first getting the row names, then iterating them:



TArray<FName> RowNames = MyTable->GetRowNames();
for (const FName& RowName : RowNames)
{
    const FMyRow* RowPtr = MyTable->FindRow<FMyRow>(RowName);
}


Works like a charm. :smiley: Even better than the TArray<FString> output from the GetTableData(), cuz you get the struct directly…
perfect, many thanks! :smiley:

PS: the documentation is kinda efed on the DataTable entries. How can I let 'em know?

Just post in the Documentation sub-forum :slight_smile: