12345678910111213141516171819 |
- using UnityEngine.UI;
- using UnityEngine.EventSystems;
- using System;
- public class MySlider : Slider, IBeginDragHandler, IEndDragHandler
- {
- public Action beiginDrag { get; set; }
- public Action endDrag { get; set; }
- public void OnBeginDrag(PointerEventData eventData)
- {
- beiginDrag?.Invoke();
- }
- public void OnEndDrag(PointerEventData eventData)
- {
- endDrag?.Invoke();
- }
- }
|