Critical Error on AIDestinationSetter + RichAI

With the configuration shown in this image, I get the following error:

MissingComponentException: There is no ‘NavMeshAgent’ attached to the “Unit_Rifleman” game object, but a script is trying to access it.
You probably need to add a NavMeshAgent to the game object “Unit_Rifleman”. Or your script needs to check if the component is attached before using it.
UnityEngine.AI.NavMeshAgent.SetDestination (UnityEngine.Vector3 target) (at :0)
MxMGameplay.AIDestinationSetter.Start () (at Assets/Plugins/MotionMatching All/MotionMatching/Demo/Code/AIDestinationSetter.cs:30)

I’ve tried everything I can think of. Why does AIDestinationSetter think there’s no NavMeshAgent on the character? I’ve been using A* for years but this issue is new for me. Is it a bug? How do I fix it?


This script

Assets/Plugins/MotionMatching All/MotionMatching/Demo/Code/AIDestinationSetter.cs:30

is not a script from the A* Pathfinding Project. Either you have modified it, or this is a script from a different plugin. The one in the A* Pathfinding Project does not require a NavMeshAgent component.

Woah, some other asset had its own version of AIDestination setter… good catch and thanks for the quick response, I was going nuts trying to figure this out!

1 Like