docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Pointer devices introduction

    A pointer device tracks positions on a 2D surface. The Input System package supports the following types of pointer device:

    • Touch
    • Mouse
    • Pen

    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 query Pointer.current.position in UnityEditor.EditorWindow.OnGUI, the returned 2D vector is in the coordinate space of your local GUI (same as UnityEngine.Event.mousePosition).
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)