using TMPro; using UnityEngine; using UnityEngine.UI; public class SliderNumToTextScript : MonoBehaviour { TextMeshProUGUI textMesh; // Start is called once before the first execution of Update after the MonoBehaviour is created void Start() { textMesh = GetComponent(); } public void OnValueChanged(Slider slider) { textMesh.text = slider.value + " %"; } // Update is called once per frame void Update() { } }