using System.Collections; using System.Collections.Generic; using System.ComponentModel; using UnityEngine; using UnityEngine.UI; public class DropUnit : MonoBehaviour { public Text nameText; public Text digitText; public GameObject bingObj; public void Init(double lgtd,double lttd,string na,string di) { Vector3 temp = CoordinateConverter.GeoToUGUISmall(lgtd, lttd); this.GetComponent().anchoredPosition3D = temp; nameText.text = na; digitText.text = di; } void Update() { this.GetComponent().anchoredPosition = CameraManager.instance.secondCamera.WorldToScreenPoint(bingObj.transform.position) * 1920.0f / Screen.width; } }