docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Enum UIPointerBehavior

    Determine how the UI behaves in the presence of multiple pointer devices.

    Namespace: UnityEngine.InputSystem.UI
    Assembly: Unity.InputSystem.dll
    Syntax
    public enum UIPointerBehavior
    Remarks

    While running, an application may, for example, have both a Mouse and a Touchscreen device and both may end up getting bound to the actions of InputSystemUIInputModule and thus both may route input into the UI. When this happens, the pointer behavior decides how the UI input module resolves the ambiguity.

    Fields

    Name Description
    AllPointersAsIs

    Any pointing device, whether it's Mouse, Pen, Touchscreen, or TrackedDevice input, is treated as its own independent pointer and arbitrary many such pointers can be active at any one time.

    SingleMouseOrPenButMultiTouchAndTrack

    Any input that isn't Touchscreen or TrackedDevice input is treated as a single unified pointer.

    This is the default behavior based on the expectation that mice and pens will generally drive a single on-screen cursor whereas touch and tracked devices have an inherent ability to generate multiple pointers.

    Note that when input from touch or tracked devices is received, the combined pointer for mice and pens (if it exists) will be removed. If it was over UI objects, IPointerExitHandlers will be invoked.

    SingleUnifiedPointer

    All input is unified to a single pointer. This means that all input from all pointing devices (Mouse, Pen, Touchscreen, and TrackedDevice) is routed into a single pointer instance. There is only one position on screen which can be controlled from any of these devices.

    In This Article
    Back to top
    Copyright © 2024 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)