using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.Rendering; public class UIManager : MonoBehaviour { public GameObject m_Agent; private float m_Speed; private string m_CurrentModel; public TextMeshProUGUI m_ModelName; public TextMeshProUGUI m_AgentSpeed; // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { m_Speed = m_Agent.GetComponent().MTargetWalkingSpeed; m_CurrentModel = m_Agent.GetComponent().m_currentModelName; m_ModelName.text = m_CurrentModel; m_AgentSpeed.text = m_Speed.ToString(); } }