unity3d c#小问题求解
public class NewBehaviourScript : MonoBehaviour {
private int m = 6;
private int n = 8;
private int[,] IconData = new int[6,8];
void Start (){
}
void Update () {
}
void OnGUI()
{
createmap(IconData);
}
void createmap(int[,] a)
{
int t = 0;
for(int i = 0;i<6;i++)
for(int j = 0;j<8;j++)
{
if(j<4)
t=0;
else
t=1;
a[i,j] = 2*i+t;
}
}
}
结果提示: error CS0103: The name `IconData1' does not exist in the current context
这是为什么呢? C# Unity3D 类
[解决办法]
IconData1和IconData?
[解决办法]
非常感谢楼主!