Udon NavMeshAgent works in Unity but not when built and tested!

Following Udon script works locally in Unity (NavMeshAgent seeks/moves to within 1.5 of the player when the player is within NavMesh boundary) but the NavMeshAgent does not move when built and tested! Any help is appreciated.

Update: I also tried this with the NavAgent seeking to a static game object with the same result - it works locally in Unity but not when built and tested!

Udon:

Object Inspector:

NavMesh Inspector:

I’m seeing the exact same thing (works in simulator but not VRChat). The VRChat logs shows the error “Failed to create agent because there is no valid NavMesh”.

I have a NavMesh baked, and the agent is in contact with it. I think the NavMesh might be getting loaded into the world after the agent. I’d like to try and delay its creation as a test but don’t know how.

If you’re still wondering about this … VRChat doesn’t yet support the Unity 2022 Navmesh system.

You need to get rid of all of your old Navmeshes. Then use the legacy “Window/AI/Navigation Obsolete”, then for all of your objects (floor and obstacles), use it to mark them as static/links, and then walkable/non-walkable. And then bake from that tool.

I just spent a whole day tearing my hair out on this but now my little world is finally working.

1 Like

Thanks for following up with a solution!