private void GenerateCarrots() { carrots = new Carrot[fieldSize.x, fieldSize.y]; for (int x = 0; x < fieldSize.x; x++) { for (int y = 0; y < fieldSize.y; y++) { Carrot newCarrot = Instantiate(carrotPrefab, GetPositionFromCoOrds(new Vector2Int(x, y)), Quaternion.identity); newCarrot.transform.SetParent(carrotParent, true); newCarrot.InitializeFullyGrownPlant(); carrots[x, y] = newCarrot; } } }