UICustomDrag.cs 726 B

123456789101112131415161718192021222324252627282930313233
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.EventSystems;
  5. namespace MetaClient
  6. {
  7. public class UICustomDrag : MonoBehaviour, IDragHandler, IEndDragHandler, IBeginDragHandler
  8. {
  9. // Start is called before the first frame update
  10. void Start()
  11. {
  12. }
  13. public void OnDrag(PointerEventData eventData)
  14. {
  15. Debug.Log(eventData.delta.x + "");
  16. }
  17. public void OnBeginDrag(PointerEventData eventData)
  18. {
  19. }
  20. public void OnEndDrag(PointerEventData eventData)
  21. {
  22. }
  23. // Update is called once per frame
  24. void Update()
  25. {
  26. }
  27. }
  28. }