title: Am I using GetComponents and IgnoreCollision correctly?
body: <p>I'm trying to get a player character in a 2D sidescroller to ignore collisions with specific objects in an array when it does a dash action. But my first attempt isn't working. No errors, it just doesn't work. The character still collides with the specific objects while dashing.</p>
  
  <pre><code> private Collider2D col;
   public Collider2D[] dashMasks;
  
   void Awake()
   {
       col = GetComponent&lt;BoxCollider2D&gt;();
       dashMasks = GetComponents&lt;Collider2D&gt;();
   }
  
   void Update()
   {
       if(dashing)
       {
           foreach(Collider2D mask in dashMasks)
           {
               Physics2D.IgnoreCollision(col, mask);
           }
       }
  }
  </code></pre>
  
  <p>Did I do the <code>GetComponenets</code> call incorrectly or did I do the <code>IgnoreCollision</code> incorrectly, or maybe both?</p>