Movement of NavMeshAgent

I have a few questions about nav agent and its movement. I have a nav agent, i have made a little map and i wanna make it move to one target, then to next target and so on. My current code is:

agent = GameObject.Find(“MyAgent”).GetComponent(NavMeshAgent);
target = GameObject.Find(“TargetsName”).GetComponent(Transform);

And then i make it move to target with:
agent.SetDestination(target.position);

  1. how do make sure, that agent arrived to its currently set destination ? Is there a realable function for that ?
  2. after that, how to make it to move to the next target ? i tried some variants, but i dont know if it failed to determine its arrival to the first target or it failed to move to the next target.

I tried looking for some functions, but havent found anything that would work, i even found on google some crazy quadra checks for question 1, but it didnt work either.

navmeshagent has remaining distance. This should be sufficient enough to determine if you have reached teh end.

steeringtarget is the current target point in the path, so you can test distance to this to determine if you have reached teh current waypoint. Useful if you want to use special code to avoid agents getting stuck on other agents and not being able to reach waypint.

generally I control all movement of my agents. Once it has calculated a path, I take those points, then send my vehicle on its way, deciding when to use the next point as the target.

I use hasPath for that. Unity - Scripting API: AI.NavMeshAgent.hasPath

When it arrived at a destination, it is set to false.

Well, it doesnt work. I wrote a line to print that boolean value of agent.hasPath every frame, and what happens is that this value is true till agent reaches the target, then i change agent destination with setDestination method, and then haspath returns both true/false values every second frame, and my agent doesnt move to the next target.