Exporting save file to a string
Exporting save file to a string
I'm currently developing for WebGL using EasySave2. Is it possible to generate a string representing the player's save data so that they can can move their save to a different computer?
Re: Exporting save file to a string
Hi there,
You can use ES2.LoadRaw(filename) to get the file as a byte array, and then convert it to a Base-64 string. e.g.
Joel
You can use ES2.LoadRaw(filename) to get the file as a byte array, and then convert it to a Base-64 string. e.g.
//Get the file as a string. string fileString = System.Convert.ToBase64String( ES2.LoadRaw("myFile.txt") ); // Save it back to a file. ES2.SaveRaw( System.Convert.FromBase64String(fileString), "myNewFile.txt");All the best,
Joel
Re: Exporting save file to a string
Thanks Joel! As always, your customer support is seriously the best out there.