My AI use NavMeshAgent.CalcuatePath. However, I have a reproducible case where the method returns an invalid path (returning false), despite no obvious reason - i.e. looking at the NavMesh a simple valid path was available.
If I use NavMeshAgent.SetDestination in the same place, a valid path is found. Specifically:
NavPath = new NavMeshPath();
bool result = agent.CalculatePath(destination, NavPath);
bool result2 = agent.SetDestination(destination);
Reliably at one point, when the code runs, result = true but result2 = false. (In the same FixedUpate frame) What could cause this? Does CalculatePath have different constraints or assumptions, or is it a bug in Unity?