ES3.Save publicstaticvoidSave<T>(stringkey,Tvalue,stringfilePath,ES3Settingssettings) Description Saves the value to a file with the given key. If the file already exists, the key will be added to the file. If the key already exists in the file, the key will be overwritten in the file...
fileKey, Application.persistentDataPath + "/" + fileName, passCodeSet);11 } 12 } Easy Save可以很⽅便的给⽂件加密,这⾥⽤的第三个版本;其中filePassCode是⽂件解密的密码,它的后台⽤的是Rijndael算法 3.写(存档)1static public void WriteGameSaveData(string fileName)
ES3.Load publicstaticTLoad<T>(stringkey,stringfilePath,TdefaultValue,ES3Settingssettings) Description Loads the value from a file with the given key. Unless you specify thedefaultValueparameter, aKeyNotFoundExceptionorFileNotFoundExceptionwill be thrown if the data does not exist. In this case, yo...
Easy Save可以很方便的给文件加密,这里用的第三个版本;其中filePassCode是文件解密的密码,它的后台用的是Rijndael算法 3.写(存档) 1staticpublicvoidWriteGameSaveData(stringfileName)2{3BinaryFormatter bf =newBinaryFormatter();4FileStream file = File.Create(Application.persistentDataPath +"/"+fileName);5bf.S...
Easy Save可以很方便的给文件加密,这里用的第三个版本;其中filePassCode是文件解密的密码,它的后台用的是Rijndael算法 3.写(存档) 代码语言:javascript 复制 1staticpublicvoidWriteGameSaveData(string fileName)2{3BinaryFormatter bf=newBinaryFormatter();4FileStream file=File.Create(Application.persistentDataPath+"/...
GameObject.Find("Easy Save 3 Manager").GetComponent<ES3ReferenceMgr>().Remove(mesh); Using Easy Save asynchronously using threads You can use Easy Save from your own thread, but you must ensure that you only use it fromone thread at a timeand that the data you are saving is thread-safe...
ES3.Save<int>("key",123,"myDirectory/myFile1.es3"); ES3.Save<int>("key",123,"MyDirectory/myFile2.es3"); ES3.Save<int>("key",123,"myDirectory/myFile3.es3"); // Now get the names of the files we created and log them to console. ...
HomeEasy Save 3Scripting APIMethodsES3.LoadInto ES3.LoadInto publicstaticvoidLoadInto<T>(stringkey,stringfilePath,Tobj,ES3Settingssettings) Description Loads the value from a file with the given key into an existing object, rather than creating a new instance. ...
ES3.LoadImage Load Image publicstaticTexture2DLoadImage(stringimagePath,ES3Settingssettings) Description Loads a JPG or PNG image file as aTexture2D. A FileNotFoundExceptionwill be thrown if the file does not exist. In this case, you can useES3.FileExiststo check if the data exists before loa...
settings [Optional]The settings we want to use to override the default settings. Returns True if the file exists, otherwise false. Examples C# JS // Checks whether a file exists before loading a key from it. if(ES3.FileExists("myFile.es3")) ...