Page 1 of 1

Best Way to Load a file in as a TextAsset object?

Posted: Mon Oct 01, 2018 5:55 pm
by westingtyler
I use Playmaker, and i'm trying to load a sql database file (.bytes) file from a folder into the game to use with some SimpleSql commands.

I need to set a database property that needs a TextAsset.

I can get easy save to see the file in the folder, but I am not sure how to set that file to a TextAsset Object in a Playmaker FSM, so I can then set the Property of the SQL database component using it.

I can "load" the file named "file name found with Get Files"... but how do I load it INTO a TextAsset?

Re: Best Way to Load a file in as a TextAsset object?

Posted: Mon Oct 01, 2018 6:05 pm
by Joel
Hi there,

Easy Save has no functionality to put data into a TextAsset, but it has a Load Raw to get the data as a string, which can be saved back to a file using the Save Raw Base 64 action.

You may want to enquire on the PlayMaker forums to see if an action exists to create a TextAsset from a string.

All the best,
Joel

Re: Best Way to Load a file in as a TextAsset object?

Posted: Mon Oct 01, 2018 6:18 pm
by westingtyler
okay, thank you!