Enum UIPointerBehavior
Determine how the UI behaves in the presence of multiple pointer devices.
Namespace: UnityEngine.InputSystem.UI
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 | Value |
---|---|---|
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, |
|
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. |