Anyone know what can cause
NavMeshAgent.CalculatePath to return false and give a path with
- I have two characters; each character has a NavMeshAgent. Character x is a standard Humanoid, character Y is a vehicle with a custom agent type.
- Characters start out in scene A, which has two NavMeshes, one for each type, and both are able to navigate just fine.
- Characters get moved to DontDestroyOnLoad so that scene A can be unloaded and scene B can be loaded.
- Scene B has two NavMeshes, one for each type.
- Characters are placed on the ground, on a valid NavMesh location.
- NavMeshAgent is asked to path to another valid location on the NavMesh. Character Y (the weird one) paths just fine, but for character X, the call to
CalculatePathfails and the
NavMeshPathobject's status is
I honestly have no idea what's going on here. If anything, I'd expect pathing to work for X and fail for Y, due to it being a nonstandard (and larger) agent. Not sure if the scene change is relevant or not; including it just in case it is, and to show that the basic setup is working for 3/4 scenarios here. Anyone know how to go about debugging this?