24 lines
503 B
C#
24 lines
503 B
C#
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<TextMeshProUGUI>();
|
|
}
|
|
|
|
public void OnValueChanged(Slider slider) {
|
|
textMesh.text = slider.value + " %";
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|