title: Error "The name does not exist in the current context", Unity
body: <p>In the function OnTriggerEnter2D I faced the error: &quot;The name &quot;collision&quot; does not exist in the current context&quot;. Here is my code:</p>
  <pre><code>public int iLevelToLoad;
  public string sLevelToLoad;
  
  public bool useIntegerToLoadLevel = false;
  
  private void OnTriggerEnter2D (Collider2D collison)
  {
      GameObject collisionGameObject = collision.gameObject;
  
      if(collisionGameObject.name == &quot;Player&quot;)
      {
          LoadScene();
      }
  
  }
  
  void LoadScene ()
  {
      if (useIntegerToLoadLevel)
      {
          SceneManager.LoadScene(iLevelToLoad);
      }
      else
      {
          SceneManager.LoadScene(sLevelToLoad);
      }
  }
  </code></pre>