Skip to content

Instantly share code, notes, and snippets.

@nguyenmanh1507
Created April 24, 2018 06:19
Show Gist options
  • Save nguyenmanh1507/502aa0b9edb8e3ce839d22b957a2a8fb to your computer and use it in GitHub Desktop.
Save nguyenmanh1507/502aa0b9edb8e3ce839d22b957a2a8fb to your computer and use it in GitHub Desktop.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
public class Draggable : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDragHandler {
public void OnBeginDrag (PointerEventData eventData) {
Debug.Log("OnBeginDrag");
Input.multiTouchEnabled = false;
}
public void OnDrag (PointerEventData eventData) {
Debug.Log("OnDrag");
Input.multiTouchEnabled = false;
}
public void OnEndDrag(PointerEventData eventData) {
Debug.Log("OnEndDrag");
Input.multiTouchEnabled = false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment