15 lines
305 B
C#
15 lines
305 B
C#
using System.Reflection.Emit;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
[RequireComponent(typeof(Text))]
|
|
public class ShowSliderValue : MonoBehaviour
|
|
{
|
|
public void UpdateLabel (float value)
|
|
{
|
|
Text lbl = GetComponent<Text>();
|
|
if (lbl != null)
|
|
lbl.text = Mathf.RoundToInt (value * 100) + "%";
|
|
}
|
|
}
|