I am using ES3 for saving and loading on console platform and found this ES2 example for reading and writing bytes on console:
https://docs.moodkie.com/easy-save-2/su ... platforms/
However I couldn't find a "ReadAllBytes()" function when converting this logic to ES3, and I can't seem to access the stream in the ES3 writer:
Code: Select all
ES3Settings settings = new ES3Settings();
settings.location = ES3.Location.Resources;
using (ES3Writer writer = ES3Writer.Create(settings))
{
writer.WriteProperty("myTag", 123);
writer.Save();
byte[] bytes = writer.stream.ReadAllBytes();
SaveToStorageAPI(bytes);
}
Code: Select all
ES3Settings settings = new ES3Settings();
settings.location = ES3.Location.Resources;
var bytes = LoadFromStorageAPI();
using (ES3Reader reader = ES3Reader.Create(bytes, settings))
{
int myInt = reader.Read<int>("myTag");
}
Thanks