我是Unity3D和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.
Run Code Online (Sandbox Code Playgroud)
以下是我正在寻求帮助的其他一些资源:http: //wiki.unity3d.com/index.php/Choosing_the_right_collection_type