using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; public class SliderReleaseHandler : MonoBehaviour, IPointerUpHandler, IDragHandler { public RewindManager rewindManager; private Slider _slider; private float _lastDragValue; void Awake() { _slider = GetComponent(); _lastDragValue = _slider.value; } public void OnDrag(PointerEventData eventData) { _lastDragValue = _slider.value; } public void OnPointerUp(PointerEventData eventData) { rewindManager.OnSliderReleased(_lastDragValue); } }