public void CreateTiledMap(int[,] mapArray, Tiles tiles) { for (int y = 0; y < numTilesY; y++) { for (int x = 0; x < numTilesX; x++) { if (mapArray[x,y] != 0 || addBlankTiles) { CreateSquare(x, y, tiles.GetTileUV(mapArray[x,y])); } } } BuildMesh (); }