Created
April 24, 2018 06:19
-
-
Save nguyenmanh1507/502aa0b9edb8e3ce839d22b957a2a8fb to your computer and use it in GitHub Desktop.
Revisions
-
nguyenmanh1507 created this gist
Apr 24, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ 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; } }