Not sure why, its working when I use one set of variables, but not the other.
Screenshots of results and code: Unity, Same code generating different results - Album on Imgur
void Start()
{
board = GetComponentInChildren<Transform>().gameObject;
int[] sizeSpaces = { Mathf.FloorToInt(boardSize.x), Mathf.FloorToInt(boardSize.y) };
boardPieces = new GameObject[sizeSpaces[0],sizeSpaces[1]];
for (int j = 0; j < boardSize.y; j=j+1)
{
for(int i = 0; i < boardSize.x; i=i+1)
{
Debug.Log("" + i + "," + j);
boardPieces[i,j] = GameObject.Instantiate(
boardPiece,
new Vector3(
(-boardSize.x / 2) + i +.5f,
0.15f, (-boardSize.x / 2) + j + .5f),
new Quaternion(0,0,0,0),
this.transform);
}
}
}