An event that is called when the mouse is clicked and dragged.
//Attach this script to a GameObject //This script is a basic overview of some of the Event Types available. It outputs messages depending on the current Event Type.
using UnityEngine;
public class Example : MonoBehaviour { void OnGUI() { Event m_Event = Event.current;
if (m_Event.type == EventType.MouseDown) { Debug.Log("Mouse Down."); }
if (m_Event.type == EventType.MouseDrag) { Debug.Log("Mouse Dragged."); }
if (m_Event.type == EventType.MouseUp) { Debug.Log("Mouse Up."); } } }