Stop can only be called on an active agent that has been placed on a NavMesh

Stop can only be called on an active agent that has been placed on a NavMesh 解决办法


The reason is that during the execution of the component, it is found that the main body has been destroyed, so the behavior tree and the navmeshagent component are disabled before the destruction.

   GetComponent<BehaviorTree>().enabled=false;
   GetComponent<NavMeshAgent>().enabled = false;

Guess you like

Origin blog.csdn.net/qq_23158477/article/details/109604182