【发布时间】:2015-06-22 05:43:39
【问题描述】:
我是 Unity3D 和 c# 的新手。我正在修补在二维数组中存储一些网格位置,但是我遇到了
the array index is out of range
错误,我不知道为什么:
public int[,] myArray;
myArray = new int[,]{
{0,375},
{75,300},
{150,225},
{225,150},
{300,75},
{375,0}
};
Debug.Log(myArray[1,4]); // array index is out of range... why? I expected to get 75.
以下是我寻求帮助的其他一些资源: http://wiki.unity3d.com/index.php/Choosing_the_right_collection_type
【问题讨论】:
标签: c# multidimensional-array unity3d grid 2d