title: 2D Collision Detection methods not getting called
body: <p>I know this question has been asked before, but I could not find an answer anywhere so please do not mark this as a duplicate.</p>
  
  <p>I am trying to make a 2D game in Unity in which I need to detect bullets hitting enemies.</p>
  
  <p>I have a Box Collider 2D and a Rigidbody 2D on both the enemy prefab and the bullet prefab.</p>
  
  <p>First off I tried doing it without the 'Is Trigger' box checked.</p>
  
  <p>This is the code I was using :</p>
  
  <pre><code>function OnCollisionEnter2D(coll: Collision2D)
  {
      Debug.Log("Detected !");
  }
  </code></pre>
  
  <p>No success.</p>
  
  <p>Next I tried putting a check in the 'Is Triggered' box, and used this code :</p>
  
  <pre><code>function OnTriggerEnter2D(other: Collider2D)
  {
      Debug.Log("Detected !");
  }
  </code></pre>
  
  <p>Once again, no success...</p>
  
  <p>The components I have on both objects are 'Box Collider 2D'.</p>
  
  <p>Neither of the methods I tried returned any error messages, the functions just didn't get called.</p>
  
  <p>If anyone please has an idea what's going on, please let me know ASAP – I cannot continue working on my game until this works :/</p>
  
  <p>Is this a bug with Unity ?  Should I report it ?</p>
  
  <p>Also, here is a screenshot of the inspector on one of the objects :
  <img src="https://i.stack.imgur.com/Et4TR.png" alt="Screenshot"></p>
  
  <p>Cheers to anyone who can answer all my questions !  Sorry if I didn't format my post right, I'm kinda new to the forum...</p>
  
  <p>Fjpackard.</p>