少年修仙传客户端基础资源
hch
2024-07-24 efc8196da01190f8739436cbbc63d7e537359522
0312 表读取支持二维数组的转化
1个文件已修改
4 ■■■■ 已修改文件
Assets/Editor/Tool/ConfigClassGenerate.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Editor/Tool/ConfigClassGenerate.cs
@@ -160,11 +160,11 @@
        field = field.Replace(" ", "");
        if (type.Contains("int[][]"))
        {
            return StringUtility.Contact(field, " = JsonMapper.ToObject<int[][]>(tables", "[", index, "]", ")", "; ");
            return StringUtility.Contact(field, " = JsonMapper.ToObject<int[][]>(tables", "[", index, "].Replace(\"(\", \"[\").Replace(\")\", \"]\")); ");
        }
        else if (type.Contains("float[][]"))
        {
            return StringUtility.Contact(field, " = JsonMapper.ToObject<float[][]>(tables", "[", index, "]", ")", "; ");
            return StringUtility.Contact(field, " = JsonMapper.ToObject<float[][]>(tables", "[", index, "].Replace(\"(\", \"[\").Replace(\")\", \"]\")); ");
        }
        else if (type.Contains("int[]"))
        {