Advertisement

Multi-Object Reading and Writing with Unity&JSONLite-JSON (3)

阅读量:

原文内容来自:Read from and write to external .json files using JsonUtilities or LitJson

文件Unity 版本号5.3,使用时候Unity 版本号5.6

文件分流unity-json-master

本文仅作分析,学习用途。

_3WriteJson_ObjectArray_LitJson

----------------------------------------------------------------------------------------------原代码+注释

// 将对象转换为JSON格式的字符串并保存到文件中。
// 使用LitJson库
// 存储嵌套对象到数组中
// 生成 {"highscore":[{"name":"MagicMike","scores":8828},{"name":"MadMax","scores":4711}]}

using UnityEngine;
using LitJson;
using System.IO;
using System.Collections.Generic;

全部评论 (0)

还没有任何评论哟~