using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; using UnityEngine.EventSystems; using UnityEngine.UI; namespace SC.XR.Unity { public class SCSlider2D : Slider { [SerializeField] public SliderEvent m_OnDrag; [SerializeField] public SliderEvent m_OnPointerDown; [SerializeField] public SliderEvent m_OnPointerUp; public override void OnPointerDown(PointerEventData eventData) { base.OnPointerDown(eventData); m_OnPointerDown?.Invoke(value); } public override void OnPointerUp(PointerEventData eventData) { base.OnPointerUp(eventData); m_OnPointerUp?.Invoke(value); } public override void OnDrag(PointerEventData eventData) { base.OnDrag(eventData); m_OnDrag?.Invoke(value); } } }