Complete the code to get the NavMeshAgent component from the GameObject.
NavMeshAgent agent = gameObject.GetComponent<[1]>();The NavMeshAgent component is accessed using GetComponent<NavMeshAgent>().
Complete the code to set the destination of the NavMeshAgent to a Vector3 position.
agent.[1](targetPosition);The method to set the destination for a NavMeshAgent is SetDestination(Vector3).
Fix the error in the code to check if the NavMeshAgent has reached its destination.
if (agent.remainingDistance [1] agent.stoppingDistance && !agent.pathPending) { // Reached destination }
To check if the agent reached the destination, remainingDistance should be less than or equal to stoppingDistance.
Fill both blanks to create a dictionary of agent speeds for agents with speed greater than 3.
var fastAgents = agents.ToDictionary(agent => agent.[1], agent => agent.[2]).Where(kv => kv.Value > 3);
Use 'name' as the key and 'speed' as the value to create a dictionary of agent speeds.
Fill all three blanks to filter agents moving faster than 5 and create a dictionary with agent names in uppercase as keys.
var fastAgents = agents.Where(agent => agent.[1] [2] 5).ToDictionary(agent => agent.[3]);
Filter agents with speed > 5 and use their uppercase names as dictionary keys.