Is there any way to count the times a NavMeshAgent avoids a collision?

I’m trying to know exactly how many times the agents avoided collisions during the execution of my game. If I could also know when this happens, it’s better. Thank you.

To my knowledge, there is nothing integrated that can solve this issue, though you can make a jankey fix by the use of colliders. You can attach a collider that is a bit larger than your nav mesh agent’s collider box and onTriggerEnter it counts up how many things went inside of the collider.