SetDestination can only be called on an active agent that is on a NavMesh

YOU ARE ACTUALLY THE MESSIAH! I’VE BEEN SPENDING SO LONG TRYING TO DO THIS AND YOU FIXED IT

What the PlayerManager do???

i have this problem

Thank you my friend

although this wasnt the issue that OP was having, it helped me so thank you.

Thx That help me alot

I had a similar problem and also solved it by updating the NavMesh agent type area masks.

Hi, i’ve had similar problems after doing the zombie FPS course from gamedevtv on Udemy. Similar issue I think to br222. When my last shot that killed the zombie happens, the game broke with the same error. The navMeshAgent.enabled is set to = false which is good to stop the zombie continuing to move but there were other calls continuing in EngageTarget() then ChaseTarget() and that kind of thing. Was actually a really easy fix and all i had to do was add a line to say isProvoked = false as then EngageTarget() stops being called.

This one worked for me in Unity 2022.3.2f1 LTS. Thank you!!

solved

In my case, I was instantiating a prefab that already had a NavMeshAgent component on it and getting the error even though I was spawning the prefab in the right place. This must have been causing something to initialize in the NavMeshAgent before it was actually placed in the scene, because removing the NavMeshAgent component from my prefab and instead creating the NavMeshAgent in the Start() method of the game object resolved the error for me.

Thankyou broo soo much it finally worked

oh you’re a savior. thank you <3

I used this code in void update and it worked
if (nav.isActiveAndEnabled)

you could try
navMeshAgent.isStopped = true;
i did the same course and this is how i did it

I think you haven’t added navmeshagent to your game object or maybe you haven’t enabled this component