whenever I uses NavMeshAgent in my C# code it won’t Identify itself. But if I use using UnityEngine.AI it will Identify itself but it won’t work in my game because the character then won’t move. Any Help is appreciated
Your “Start()” function is spelled as “start()” and will never be called by Unity.
Upper/lower case is critical in software engineering.If you are in doubt, always copy/paste the built-in delegate methods from the reference Unity documentation to get the spelling and case correct.
Or use the Implement MonoBehaviour Method from the context menu in VS ![]()
You have to call UnityEngine.AI - it’s the namespace the NavMeshAgent lives in. If the character isn’t moving, it’s not becuase you are using that namespace, it’s because you aren’t doing something else. You cannot call NavMeshAgent without using it’s parent namespace.
And yes, Start() needs to be in caps.
NOTE: the UnityEngine.AI namespace is a Unity 5.5 and higher namespace only.
In Unity 5.4 and earlier, NavMeshAgent is just in the basic UnityEngine namespace.
True - I inferred that he was on 5.5 since he said it only worked with UnityEngine.AI.
Yep that was the problem + the Start() , I went down from 5.5 to 5.4 and it now works. Thank you ![]()
