The mouse position.
Used in EventType.MouseMove and EventType.MouseDrag events.
See Also: Event.delta.
using UnityEngine; using System.Collections;
// print the mousePosition every 10th of a second
public class ExampleClass : MonoBehaviour { private float range = 0.0f;
void OnGUI() { range = range + Time.deltaTime;
if (range > 0.1f) { Event e = Event.current; Debug.Log(e.mousePosition); range = 0.0f; } } }