我是Unity3D和c#的新手。我与存储的二维数组,但是我碰到的用c访问2d数组时出错#
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
https://msdn.microsoft.com/en-us/library/2yd9wwz4.aspx