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; // 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(); } }