using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using TMPro; namespace RPGCreationKit { public class UISliderValueDisplayer : MonoBehaviour { [SerializeField] private Slider slider; [SerializeField] private TextMeshProUGUI _text; public bool IsAudio = false; public void Update() { if (IsAudio == false) { _text.text = slider.value.ToString("F2"); } else { float NewValue = slider.value * 100; _text.text = NewValue.ToString("F2"); } } } }