美文网首页Unity3D
unity配置工具

unity配置工具

作者: 言之有物行之有理 | 来源:发表于2020-02-29 14:58 被阅读0次

1.Excel 配表转换成 Json文件以及数据结构代码。

   https://github.com/huangkumao/ConfigTools

2.Json文件读取到对应到数据结构中。

     https://github.com/SaladLab/Json.Net.Unity3D

     CfgEditorPetList是配置表,会生成对应名字的类和Json文件。解析代码如下。

    代码:

     string path = Application.dataPath + "/Json/CfgEditorPetList.json";

     string content = File.ReadAllText(path);

      CfgEditorPetList t = JsonConvert.DeserializeObject< CfgEditorPetList>(content);

相关文章

网友评论

    本文标题:unity配置工具

    本文链接:https://www.haomeiwen.com/subject/xqiphhtx.html