I don't have a ES3.MoveFile() function, but I'm sure you meant ES3.CopyFile(). I tried using it but overall I think my .byte file is simply not correct, because using the function did pretty much nothing, not even a log entry or warning/error.
In the documentation it says
Alternatively, you can save data to a folder of your choice and then drag it into the Resources folder.
Code: Select all
ES3.Save<int>("myKey", 123, Application.dataPath+"/Resources/myFile.bytes");
AssetDatabase.Refresh();
should this file be saved with the location setting "ES3.Location.File" or "ES3.Location.Resources"? I can only save it with the "file" location and I'm not sure if changing the ending from .es3 to .byte is all I have to do.
I did a small test.es3/test.byte and both files look like this:
Code: Select all
"missionID" : {
"__type" : "int",
"value" : -1
},
"mapID" : {
"__type" : "int",
"value" : 1
},
"saveGameName" : {
"__type" : "string",
"value" : "asdasda"
},
"dateTime" : {
"__type" : "System.DateTime,mscorlib",
"value" : {
"ticks" : 637613808181905035
}
}
loading with ES3.GetFiles() and Es3.KeyExist() works fine with when loading from the file, but with the following code I get the error "
FileNotFoundException: File "asdasda-meta" could not be found.
ES3.Load[T] (System.String key, ES3Settings settings) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:394)
ES3.Load[T] (System.String key, System.String filePath, ES3Settings settings) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:379)"
Code: Select all
ES3Settings loadFromResource = ES3Settings.defaultSettings;
loadFromResource.location = ES3.Location.Resources;
AssetDatabase.Refresh();
var myMissionID = ES3.Load<int>("missionID", "asdasda-meta.bytes", loadFromResource);
Debug.Log(myMissionID);