NullReferenceException using ai.destination

I am using the code in the documentation for random wandering. For some reason ai.destination is giving me a NullReferenceException: Object reference not set to an instance of an object. Not sure why this is happening. My ai character has pathfinder attached with navmesh graph added, Seeker, and AIPath. Not sure if I’m missing something or what might be causing this? I guess the documentation didn’t make it too clear on how the ai character needs to be setup exactly. My old system used navmesh agent, which was able to navigate on the navmesh fine.

Hi

That sounds like your ai field is null. I don’t know how your script looks, so i cannot help you in any more detail, I’m afraid.