title: Collider2D trigger on a different gameObject C# Unity3D not working
body: <p>In Unity, how can my code detect when a trigger occurs with a specific distinct object?</p>
  
  <p>I already tried several things, such as:</p>
  
  <pre><code>using UnityEngine;
  using System.Collections;
  
  public class PlayerController : MonoBehaviour {
  
      public GameObject DualCannon_PU;
  
      void OnTriggerEnter2D (Collider2D coll) {
          if (coll.name == "DualCannon_PU") {
              Debug.Log ("DualCannon PowerUp");
          }
      }
  }
  </code></pre>
  
  <p>But it doesn't work: it doesn't trigger anything and "DualCannon PowerUp" does not appear in console.</p>
  
  <p>In player gameObject "is trigger" is checked and my powerUp (DualCannon_PU) "is trigger" is not checked.</p>
  
  <p><img src="https://i.stack.imgur.com/spjqZ.png" height="500">
  <img src="https://i.stack.imgur.com/wwcoC.png" height="500"></p>
  
  <p>I noticed that I had 2 "Player Controller (Scripts)", I deleted the first one but the problem still persists...</p>
  
  <p><br></p>
  
  <p>an example of what I want:</p>
  
  <p>I have 4 gameObjects and both have 2D Colliders</p>
  
  <ul>
  <li><strong>A.</strong> Player ship ("is trigger" is on)</li>
  <li><strong>B.</strong> Enemy projectiles</li>
  <li><strong>C.</strong> Health PowerUp</li>
  <li><strong>D.</strong> Dual Cannon PowerUp</li>
  </ul>
  
  <p>Condition I want:</p>
  
  <ol>
  <li>A is triggered by B, C, and D  </li>
  <li>When B triggers with A in A script (Player.cs) executes: <code>health -= laser.GetDamage();</code></li>
  <li>When C triggers with A in A script (Player.cs) executes: <code>health = health + 10;</code></li>
  <li>When D triggers with A in A script (Player.cs) executes <code>isDualCannon = true</code></li>
  </ol>