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); }
private string GetPath(JsonExecutor jsonExecutor) { return($"{Application.persistentDataPath}/{jsonExecutor.GetFilename()}.json"); }