How do I define my data table row type so that I can import my data table?

I see that there is functionality for getting data from data tables now in blueprints, but I can’t import the .csv successfully, there is a single option in the dropdown box upon import which gives a “not enough rows” error.

It seems like I need to define my own structure somewhere so that I can import the data table, but I don’t know where to do that. I can’t seem to do it in an enum because the UE there seems to assume I’ve got the table imported already.

As far as I can find, the table must be defined in C++ as a struct derived from FTableRowBase (eg. struct MyTableType : public FTableRowBase)

“Not enough rows” error also shows up when exporting from google docs, but it doesn’t sound like you’re that far yet

In case you haven’t found it, the documentation can be found here: https://docs.unrealengine.com/latest/INT/Gameplay/DataDriven/index.html

As Grogger said the “not enough rows” error turns up when you try to use a .csv file export from Google Docs. The reason being the parser in the Unreal Engine expects lines to end in \r\n but Google exports them with just \r.

I found if you open the file up in Sublime and go to View->Line Endings->Windows and save the file it will be formatted correctly.

No need for C++ structs, here is the method of making and using datatables directly with BP.

-m

1 Like

Just because you can do BP structs, doesn’t mean you should. In 99% of cases you want C++ structs to use them in your C++ code