How to make the enemy avoid each other

I’m using NavMeshAgent for my AI and my question is: is there any way of making them as an obstacle for themselves? The reason of this is that when I have a large group of enemies they ignore themselves and so push each other in order to reach the player’s position.

As the manual says(and I tried), I can’t use NavMesh Obstacle component in a object with the NavMeshAgent, they don’t work together since they will try to leave that space with no mesh, resulting in weird and super fast movements.

So how can we achieve that? Is it possible to cheat somehow these two componentes so they can work together like an agent ignoring its own navmesh obstacle component?

You cannot use them simultaneously, but you can enable one at a time!

Straight from the Unity Documentation: