title: Converting from Pixel Coordinates to UI Coordinates in Unity
body: <p>Does anyone know how to convert from Pixel Coordinates to UI Coordinates and vice-versa in Unity? Let's say for example I want to click somewhere on the screen with the mouse, and a UI Image to be at that click position. If I do this won't work:</p>
  
  <pre><code>Image img = null // I assign it via the inspector
  void Update()
  {
      if(Input.GetMouseButtonDown(0))
      {
          img.rectTransform.anchorPosition = Input.mousePosition;
      }
  }
  </code></pre>