docs.unity3d.com
    Show / Hide Table of Contents

    Enum UIPointerBehavior

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

    Namespace: UnityEngine.InputSystem.UI
    Syntax
    public enum UIPointerBehavior : int
    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 Value
    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.

    0
    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.

    1
    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.

    2
    In This Article
    • Fields
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023