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

Easy Save 2 has been replaced by Easy Save 3, so is no longer supported.
Locked
westingtyler
Posts: 28
Joined: Tue May 10, 2016 4:00 pm

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

Post 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?
Attachments
text asset load how.PNG
text asset load how.PNG (76.68 KiB) Viewed 2874 times
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

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

Post 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
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
westingtyler
Posts: 28
Joined: Tue May 10, 2016 4:00 pm

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

Post by westingtyler »

okay, thank you!
Locked