TestScript.cs
using UnityEngine; using UnityEngine.UI; public class TestScript : MonoBehaviour { public Slider lerpSlider; public Slider moveTowardsSlider; public Slider pingPongSlider; void Update() { //Lerp lerpSlider.value = Mathf.Lerp(lerpSlider.value, lerpSlider.maxValue, 0.5f * Time.deltaTime); //MoveTowards moveTowardsSlider.value = Mathf.MoveTowards(moveTowardsSlider.value, moveTowardsSlider.maxValue, 10f * Time.deltaTime); //PingPong pingPongSlider.value = Mathf.PingPong(20 * Time.time, pingPongSlider.maxValue); } }