NavMesh agent Pathfinding Zombies

What i want to do is similiar what in Call of Duty Nazi zombies mode

Player is in house, zombies are going to eat the player but if there is door in zombie's path/way then he have to break that door first and then continue to the player.

I was thinking something like this

Zombie is scanning all doors including empty door holes, then chooses the one what is closest to him and goes that way EVEN if there is empty door hole like 5m longer distance but it always chooses the closest want, thats what i want for that part, but i dont know how i can make this work properly.

I tried to add collider box to doors and stop zombies and i somehow got it work but its not quite right i guess because zombies are still coming a bit through the doors and if player is next to that door zombies start hurting the player because i use simple check like this

if(Distance < 2.0f) { ZombieAttackPlayer(); }

I need some help how i can do this system properly, please and thanks!

My suggestion would be to have the zombies stop when they're within a certain distance of the door, and then go into some state where they're clawing at the door. During this state, they damage the door and won't damage the player. That's a start anyway, although it won't take into account things like the player running outside through another door.

AgentParsec got it generally right but you'll have to check which side of the door the zombie's on and cull the checks for less overhead. You could also do collision/trigger checks which will take a lot of the code off your shoulders