title: error CS0138: A 'using namespace' directive can only be applied to namespaces; 'Collision2D'
body: <p>I tried to make a script for moving platforms, where Player can stay "blocked" on it.But when i saved the script, it showed me this: `error CS0138: A 'using namespace' directive can only be applied to namespaces; 'Collision2D' is a type not a namespace. Consider a 'using static' directive instead</p>
  
  <p>The script is : </p>
  
  <pre><code>using UnityEngine;
  using UnityEngine.Collision2D;
  
  public class OnMovingPlat : MonoBehaviour
  {
  
      [SerializeField]
      private Vector3 velocity;
  
      private bool moving;
  
      private void OnCollisionEnter2D(Collision2D collision)
      {
          if (collision.WasWithPlayer())
          {
              moving = true;
              collision.collider.transform.SetParent(transform);
          }
      }
  
      private void OnCollisionExit2D(Collision2D collision)
      {
          if (collision.WasWithPlayer())
          {
              collision.collider.transform.SetParent(null);
          }
      }
  
      private void FixedUpdate()
      {
          if (moving)
          {
              transform.position += (velocity * Time.deltaTime);
          }
      }
  }
  </code></pre>
  
  <p>What can i do ?</p>