title: Destroy a GameObject when it enters a trigger collider?
body: <p>I am having trouble destroying a GameObject when it enters a GameObject with a BoxCollider2D that is set to be a trigger. I have a javascript script on the GameObject that reads as follows:</p>
  
  <pre><code>#pragma strict
  
  function OnTriggerEnter (other : Collider) {
      Destroy(other.gameObject);
  }
  </code></pre>
  
  <p>What I want the script to do is destroy any object that enters the trigger collider. My game is 2D, if that helps.</p>
  
  <p>Any help is appreciated! :)</p>
  
  <p>Also, what does <code>#pragma strict</code> do and why is it there?</p>