public static void SaveInt(string path, int value) { string s = EncryptInt(value); SavingDataWithJson.SaveData(s, path); var newPath = Path.Combine(Application.persistentDataPath, path); using (StreamWriter streamWriter = File.CreateText(newPath)) { streamWriter.Write(s); } }
public static void SaveList <T>(string path, List <T> list) { string s = JsonHelper.ToJson(list); SavingDataWithJson.SaveData(s, path); var newPath = Path.Combine(Application.persistentDataPath, path); using (StreamWriter streamWriter = File.CreateText(newPath)) { streamWriter.Write(EncryptString(s)); } }