コード例 #1
0
ファイル: SaveIO.cs プロジェクト: GreenTea-M/ProjectPengi
        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);
        }
コード例 #2
0
ファイル: SaveIO.cs プロジェクト: GreenTea-M/ProjectPengi
 private string GetPath(JsonExecutor jsonExecutor)
 {
     return($"{Application.persistentDataPath}/{jsonExecutor.GetFilename()}.json");
 }