我希望有人可以帮助序列化此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