Handling for when the content is beging being dragged.
#pragma strict // Required when using event data //Do this when the user starts dragging the element this script is attached to.. public function OnBeginDrag(data) { Debug.Log("They started dragging " + this.name); }
using UnityEngine; using System.Collections; using UnityEngine.EventSystems; // Required when using event data
public class ExampleClass : MonoBehaviour, IBeginDragHandler // required interface when using the OnBeginDrag method. { //Do this when the user starts dragging the element this script is attached to.. public void OnBeginDrag(PointerEventData data) { Debug.Log("They started dragging " + this.name); } }