Download

How to import a DataTable from a C++ editor script

Hey everyone!

After looking through the forums and the API documentation it is my understanding that DataTables are supposed to be a static resources that do not change dynamically. However, I am trying to only load the DataTable once and save it - basically the equivalent of drag-and-dropping a .CSV files into the editor and selecting an appropriate row structure. In short what I want to happen in my editor script is:

  1. Select a .CSV file on the user’s PC
  2. Read / parse the CSV
  3. Create my custom DataTable structure from this .csv file
  4. Save the DataTable as an asset to be later used in the editor

I can read a .csv file, I have my row data structure but I am completely stumped as to how to actually import a full datatable from c++ code. Any suggestions?