private void CreatePath() { Waypoint currentCheckingWaypoint = endWaypoint; while (currentCheckingWaypoint != startWaypoint) { path.Add(currentCheckingWaypoint); currentCheckingWaypoint.ColorPath(); currentCheckingWaypoint = currentCheckingWaypoint.exploredFrom; } path.Add(startWaypoint); path.Reverse(); /* EnemyMovement myEnemy = FindObjectOfType<EnemyMovement>(); * myEnemy.StartMove(path); */ }