private void InitEnemy(EnemyUnit enemyUnit) { foreach (var tileNode in chosenPath) { enemyUnit.AddWaypoint(tiles[tileNode.x + tileNode.y * RowCount]); } //enemyUnit.AddWaypoint(tiles[4 + 4 * RowCount].transform.position); enemyUnit.AddWaypoint(tiles[endIndex]); }