Hi all!
I wanted to share some of our blueprint table functions with the community. As with anything not supported by Epic, use at your own risk.
The C++ blueprint function library is attached.
Data Table as a Blueprint Variable
Epic claimed this functionality will be available without engine modification in 4.15:
Unreal Engine Issues and Bug Tracker (UE-23282)
If you are compiling the engine, I recommend tagging UDataTable as BlueprintType so that you can use tables as blueprint variables.
DataTable.h:
UCLASS(MinimalAPI)
class UDataTable
To:
UCLASS(MinimalAPI, BlueprintType)
class UDataTable
This engine change is not required for any of the attached functions.
Get Data Table Index Of Row
Given a DataTableRowHandle (table + row name), return the row index within the table.
Get Data Table Row By Index Wildcard
Given a table and a row index, return the data of that table row.
Get Data Table Row By Name Wildcard
Given a table and a row name, return the data of that table row.
Get Data Table Row Count
Given a table, return the number of rows.
Get Data Table Row Wildcard
Given a DataTableRowHandle (table + row name), return the data of that table row.
Notes
For all the functions with bool Return Value, Return Value will be false if the input parameters are invalid.
For the “Wildcard” functions, the Row output must be connected or the blueprint will not compile, and whatever struct the Row output is connected to will determine it’s type. Table row struct inheritance is supported if you are doing that in C++.
Installation
You will have to change the API to your module name. E.g. POUNDSAND_API to MYGAME_API
You will have to change the first cpp include to your module include. E.g. #include “PoundSand.h” to #include “MyGame.h”
Enjoy!
Torin Kampa
http://www.poundsand.com/