Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: huminaboz on April 23, 2017, 05:00:15 PM

Title: Where's ScreenToWorldPoint() ?
Post by: huminaboz on April 23, 2017, 05:00:15 PM
Okay am I going crazy, or does UICamera.ScreenToWorldPoint() not exist anymore?

  1. public UICamera uiCam; //assigned in editor
  2. Vector2 screenPos = (Vector2) Camera.main.WorldToScreenPoint(position);
  3. transform.position =  uiCam.ScreenToWorldPoint(screenPos);

error CS1061: Type `UICamera' does not contain a definition for `ScreenToWorldPoint' and no extension method `ScreenToWorldPoint' of type `UICamera' could be found. Are you missing an assembly reference?
Title: Re: Where's ScreenToWorldPoint() ?
Post by: ArenMook on April 26, 2017, 07:12:13 AM
UICamera never had it. Camera did -- it's a Unity class.