Hi! I want to capture data during gameplay and store as an actual ASSET to be used on packaged versions and I wonder what is the best way to achieve this? I can easily store on a savegame but savegames cant be later used as actual assets in the editor so cant be embeedded in the packaged game.
Is there a way to script-create a data asset from scratch using editor utilities?
I’d love to 1st store the data in some savegame and then use some scripting to turn the saved data into data table asset…I think there is a way to write a CSV file and then import that as data table…is there a better workflow?
Ok making the CSV and then import is not that bad so this is the
test i did:
1 - create myCustomStruct struct with the fields of the CSV, in my test I just added a single
struct with one column titled ‘data’ of integer values
2 - create a test loop that generates an array of strings.
first item must hold the column names so as I have only one I
just add → ,data ← as first item of the array…note the comma at the beginning because
first column of the csv is for the ‘row name’ so I keep blank…ion that column I will add
index numbers. then I just add strings in the loop making random integers
when the loop ends It saves the csv file with victory plugin ‘File IO Save String Array to File’