Pointer devices introduction
A pointer device tracks positions on a 2D surface. The Input System package supports the following types of pointer device:
Pointer devices are represented by the Pointer class which inherits from the InputDevice class. They have a shared set of behaviors and controls, which are explained in the Pointer API documentation.
For a list of platforms that support pointers, refer to Supported devices reference.
Pointer window space
The coordinates of pointers depend on whether you're working in a player or in the Unity Editor:
- In player code, the coordinates are in the coordinate space of the Player window.
- In Editor code, the coordinates are in the coordinate space of the current
EditorWindow. For example, if you queryPointer.current.positioninUnityEditor.EditorWindow.OnGUI, the returned 2D vector is in the coordinate space of your local GUI (same asUnityEngine.Event.mousePosition).