using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
public class ShowValue : MonoBehaviour
{
[SerializeField] private Slider _slider;
[SerializeField] private TextMeshProUGUI _sliderText;
void Start()
{
_slider.onValueChanged.AddListener((v) =>{
_sliderText.text = v.ToString("0");
});
}
}
How to report your problem productively in the Unity3D forums:
How to understand compiler and other errors and even fix them yourself:
Here’s an example of simple persistent loading/saving values using PlayerPrefs:
Useful for a relatively small number of simple values.