title: How to access a specific component in unity
body: <p>Ok, I'm trying to access a boxcollider2d from within a collision callback like that:</p>
  
  <pre><code>    void OnCollisionEnter2D(Collision2D col)
      {
          col.collider.GetComponent&lt;BoxCollider2D&gt;().sharedMaterial.friction = 0;
      }
  </code></pre>
  
  <p>But first it doesn't work (the propoerty is null) and second how would I do if I had two boxcollider2d ?</p>
  
  <p>What is the right method ? </p>
  
  <p>Thanks</p>