How the bullet does not pass through the object? c#

When the player is to shoot the enemy.
If the bullets hit the object.
Bullet does not pass through the object.


Thanks

http://docs.unity3d.com/Manual/LayerBasedCollision.html

Take a look at Layer-Based Collision Detection. You can probably setup which layers collide with other layers or not.