using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class TextAutoscroll : MonoBehaviour { [SerializeField] private Scrollbar _scrollbar; public void Scroll(float time) { LeanTween.value(1, 0, time).setDelay(1).setOnUpdate((float x) => { _scrollbar.value = x; }).setEaseInOutCubic(); } }