using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.UI; [RequireComponent(typeof(TMP_Text))] public class SliderValueText : MonoBehaviour { private TMP_Text txt; public Slider slider; void Awake(){ txt = GetComponent(); } // Update is called once per frame void Update() { txt.text = $"{slider.value- slider.minValue}/{slider.maxValue-slider.minValue}"; } }