SOLVED: I’m using Netcode for GameObjects and for some reason you need to spawn your NetworkObjects the frame after Instantiation for all the NavMesh’s to be picked up correctly by the new Agent. Weird bug but hope this helps someone else out!
Hi,
I am using NavMesh in Unity 2022 LTS in my 2d game and am getting a strange problem when trying to spawn NavMeshAgents on separated NavMesh areas.
In the below screenshot, I try to spawn agents in areas B and C but they will always just spawn in NavMesh area A. It’s as if the game does not realise the areas B and C exist. As soon as I build navmesh area “bridges” between the areas they spawn as expected in the correct locations.
What could be the problem here? I use BuildNavMesh() to dynamically update my navmeshes when I change levels in game but the Scene view seems to show the meshes have been built correctly during runtime?
