SliderValueDisplay.cs 303 B

1234567891011121314151617181920
  1. using UnityEngine.UI;
  2. using UnityEngine;
  3. public class SliderValueDisplay : MonoBehaviour {
  4. Text theText;
  5. void Start()
  6. {
  7. theText = GetComponent<Text>();
  8. }
  9. public void SetValue(float value)
  10. {
  11. theText.text = value.ToString("#.00");
  12. }
  13. }