您当前的位置: 首页 >  十幺卜入 ar

Unity3d LitJson 对象数组报错:ArgumentException: Unable to wrap the given object with JsonData

十幺卜入 发布时间:2021-03-09 15:43:13 ,浏览量:3

前言

之前都是直接用LitJson解析接口的数据,今天打算先自己造一些数据查看界面更新状况,结果就翻车了,看日志应该是在制造对象数组的这里,菜如老狗。 所以抽两分钟,来记录一下。

出错代码
    void testJson() {
        int count = UnityEngine.Random.Range(3, 6);
        JsonData param = new JsonData();

        param["code"] = "200";
        param["datas"] = new JsonData();
        for (int i = 0; i             
关注
打赏
1688896170
查看更多评论
0.0475s