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