using UnityEngine; using System.Collections; public class DBTool :MonoBehaviour { void Update(){ var ScreenPoint = Camera.main.WorldToScreenPoint (transform.position); var NGUiPoint = UICamera.CurrentEvent.ScreenToWorldPoint (ScreenPoint); //NGUI的位置坐标给赋值为NGUIPoint即可 } } |
|