Complete the code to declare a variable for the target position.
public Vector3 [1];The variable targetPosition is used to store the destination point for pathfinding.
Complete the code to get the NavMeshAgent component attached to the GameObject.
agent = GetComponent<[1]>();The NavMeshAgent component controls the pathfinding and movement on the NavMesh.
Fix the error in setting the destination for the NavMeshAgent.
agent.[1](targetPosition);The correct method to set the destination of a NavMeshAgent is SetDestination.
Fill both blanks to check if the agent has reached its destination.
if (agent.[1] <= agent.[2]) { Debug.Log("Destination reached"); }
The remainingDistance property tells how far the agent is from the destination, and stoppingDistance is the distance at which the agent stops moving.
Fill all three blanks to create a dictionary mapping waypoint names to their positions, filtering only waypoints within 10 units.
var waypoints = new Dictionary<string, Vector3>() {
{"Start", [1],
{"Middle", [2],
{"End", [3]
};The waypoints are positions represented by Vector3. Only points within 10 units are included, so positions at (0,0,0), (5,0,5), and (10,0,10) are correct.