NavMeshPathStatus.PathComplete but 0 corners?

I’m just trying to wrap my head around this, and i’m not sure this is a bug, or ‘by design’.

But when we calculate a navmesh and get the NavMeshPathStatus, it will often return PathComplete, but have a length of 0 corners, which in my opinion should return NavMeshPathStatus.PathInvalid.

Now the workaround is easy, but it does require checking for both the status and the corner length, which can’t be good performance wise (though debatable is of course whether or not his would even measure in the whole navigation logic of our script given that a navmesh path calculation is already rather heavy performance wise.)

If you are only concerned about performance, then think about this: How would Unity implement your request? That’s right. They would probably just move your current length-test into their function and set the NavMeshPathStatus accordingly to the length==0. Nothing gained (but most probably nothing lost).

If you are concerned about the beauty of the interface, just write a wrapper around it or define an extension method. :wink: