Okey, this is my error.
NullReferenceException: A null value was found where an object instance was required.
gameManager.Awake () (at Assets/gameManager.cs:37)
I am trying to create a wave list for a TD game like Balloons TD. I was going to do something like
public GameObject[,] waveSpawnList;
then assign everything in the inspector manually. so that it would be a little more user friendly to make multiple levels. Sadly, i cant get my unity to display 2d arrays. so i thought to use a little shortcut. I thought i would create a key variable, were i change one number in a list of numbers, to assign my GameObjects to each array.
well here it is, and it keeps returning null for some reason. minion1_1 and minion1_2 are assigning in the inspector.
The problem is coming from line 19
public GameObject minion1_1;
public GameObject minion1_2;
private int[,] minionAssinger = {{1,1,1,1,1},{1,1,2,1,1},{1,1,2,2,1},{1,2,2,2,1},{1,2,2,2,2},{2,2,2,2,2}};
private GameObject[,] waveMinionArray;
void Awake () {
spawningMinions = false;
for(int i = 0; i < 30; i++){
Debug.Log ("2");
for(int x = 0; x < 30; x ++){
Debug.Log ("3");
switch(minionAssinger[i,x]){
case 1:
waveMinionArray[i,x] = minion1_1;
break;
case 2:
waveMinionArray[i,x] = minion1_2;
break;
}
}
}
}