| 123456789101112131415161718192021222324252627282930313233 | 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);                nameText.text = na;        float value = 0.0f;        if(float.TryParse(we,out value))            valueText.text = value.ToString("0.00");        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;    }}
 |