30 lines
679 B
C#
30 lines
679 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
|
|
public class GetPositionData : MonoBehaviour
|
|
{
|
|
public DisplayLongitudeAndLatitude inputData;
|
|
private TMP_Text textMeshPro;
|
|
// Start is called before the first frame update
|
|
void Awake()
|
|
{
|
|
textMeshPro = GetComponent<TMP_Text>();
|
|
if (textMeshPro != null)
|
|
{
|
|
textMeshPro.text = "等待数据......";
|
|
}
|
|
else
|
|
{
|
|
Debug.LogError("当前物体上没有 TextMeshPro 组件!");
|
|
}
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
textMeshPro.text = inputData.outputPosition;
|
|
}
|
|
}
|