| 12345678910111213141516171819202122232425262728293031 | using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.UI;public class SWHeightUnit : MonoBehaviour{    public Text nameText;    public Text valueText;    public GameObject bingObj;    // Start is called before the first frame update    void Start()    {            }    public void Init(double lgtd, double lttd, string na, string we)    {        Vector3 temp = CoordinateConverter.GeoToUGUI(lgtd, lttd);        this.GetComponent<RectTransform>().anchoredPosition3D = temp;        nameText.text = na;        valueText.text = we;    }    // Update is called once per frame    void Update()    {        this.GetComponent<RectTransform>().anchoredPosition = CameraManager.instance.secondCamera.WorldToScreenPoint(bingObj.transform.position) * 1920.0f / Screen.width;    }}
 |