using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class SliderDisplay : MonoBehaviour { public TMPro.TMP_Text Text; public void UpdateDisplay(float value) { if (Text == null) //Legacy, some UI needs to be updated { this.GetComponent().text = value.ToString("F2"); } else { Text.text = value.ToString("F2"); } } }