title: Unity: Detect if player is in an area
body: <p>Hello I'm making a 2d game on unity and I m having areas in my game where the action is different like if player enters the zone only then he's supposed to shoot</p>
  
  <p>Sorry for the bad quality of the image in on my phone and tried to draw something as an example the red circle is the player and the blue rectangles is the area I'm supposed to detect</p>
  
  <p><a href="https://i.stack.imgur.com/SleqR.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SleqR.jpg" alt="example"></a></p>