Код: Выделить всё
for (int x = 0; x< gridSize.x; x++){
for(int y = 0; y < gridSize.y; y++){
Vector2 cords = new Vector2Int(x,y);
grid.Add(cords, new Node(cords));
}
}
Подробнее здесь: https://stackoverflow.com/questions/786 ... -parameter
Код: Выделить всё
for (int x = 0; x< gridSize.x; x++){
for(int y = 0; y < gridSize.y; y++){
Vector2 cords = new Vector2Int(x,y);
grid.Add(cords, new Node(cords));
}
}