Code: Select all
ArgumentException: Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.
ES3Internal.ES3Stream.CreateStream (System.IO.Stream stream, ES3Settings settings, ES3Internal.ES3FileMode fileMode) (at Assets/Plugins/Easy Save 3/Scripts/Streams/ES3Stream.cs:102)
ES3Reader.Create (System.Byte[] bytes, ES3Settings settings) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:364)
ES3File.SaveRaw (System.Byte[] bytes, ES3Settings settings) (at Assets/Plugins/Easy Save 3/Scripts/ES3File.cs:170)
ES3File..ctor (System.Byte[] bytes, ES3Settings settings) (at Assets/Plugins/Easy Save 3/Scripts/ES3File.cs:83)
Code: Select all
byte[] bytes = ES3.LoadRawBytes(ES3Settings.defaultSettings); // Using the default setting with AES
ES3File newFile = new ES3File(bytes);
System.DateTime serverFileDateTime = serverFile.Load<System.DateTime>("Timestamp"); // Try to read the Timestamp variable saved in the file but it causes ArguementException
Code: Select all
...
ES3File newFile = ES3File(bytes, ES3Settings.defaultSettings);
... // Still giving ArguementException
Code: Select all
...
string tmpPath = ES3Settings.defaultSettings.path;
var tmpSetting = new ES3Settings(tmpPath, ES3Settings.defaultSettings);
ES3.SaveRaw(bytes, tmpPath);
ES3File newFile = new ES3File(tmpSetting);
System.DateTime serverFileDateTime = serverFile.Load<System.DateTime>("Timestamp"); // No ArgumentException, all good!