java 二维数组序列化_c# - 在Unity中序列化二维数组的列表 - 堆栈内存溢出

我希望有人可以帮助序列化此2d阵列配置...本质上,它可以序列化所有内容,但不序列化称为wallConfig0 ... 3的2d阵列。 现在我有4个,但是我想有一个wallConfig 2d数组的列表,可以将其序列化为JSON。 请给我一些有关如何序列化此数据结构的指导。 谢谢。

-Rik

我有房间清单:

[Serializable]

public class RoomDataList

{

public List roomDataList = new List();

}

每个房间都有以下数据:

[Serializable]

public class RoomData {

public int[,] wallConfig0;//TODO: change to list of 2d arrays

public int[,] wallConfig1;

public int[,] wallConfig2;

public int[,] wallConfig3;

public float[] wallLoc0;//TODO: change to list of vector3

public float[] wallLoc1;

public float[] wallLoc2;

public float[] wallLoc3;

public float wallRot0;

public float wallRot1;

public float wallRot2;

public float wallRot3;

public int[,] floorConfig;

pub

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值