private string LoadJsonString(JsonExecutor jsonExecutor) { var path = GetPath(jsonExecutor); if (File.Exists(path)) { jsonExecutor.UsingJsonData(File.ReadAllText(path)); return(jsonExecutor.GetJsonString()); } Debug.LogError("Save file not found in path: " + path); return(null); }
private bool OverwriteJson(JsonExecutor jsonExecutor) { if (jsonExecutor.GetFilename() == null) { return(false); } string path = GetPath(jsonExecutor); File.WriteAllText(path, jsonExecutor.GetJsonString()); #if UNITY_WEBGL if (Application.platform == RuntimePlatform.WebGLPlayer) { SyncFiles(); } #endif return(true); }