-
Notifications
You must be signed in to change notification settings - Fork 327
FIX: Touch simulation leading to exceptions and assertions in UI module (case 1190150). #1258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we shouldn't create desynchronization between managed and native states unnecessarily, if it can be avoided let's fix it in this PR before merging. I'm ok with ignoring nitpicks for now.
{ | ||
get => (m_ControlFlags & ControlFlags.IsButton) == ControlFlags.IsButton; | ||
set | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: Setter on question-as-property feels weird, control.isButton = true
is hard to understand what it is gonna to. Either we need a better prop, like controlType
which accepts an enum, and then that is mapped to flags internally. Or remove setter completely, because there is only one place in this PR using the setter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's ok for now because button is a property of control, not type of control. But it's even more confusing.
Packages/com.unity.inputsystem/InputSystem/Plugins/UI/InputSystemUIInputModule.cs
Outdated
Show resolved
Hide resolved
I'm not clear on what you mean by fixing, though. Having the backend keep sending events with the frontend no longer processing them IMO is something we want. Communicating this fact to the backend just seems like it would duplicate data for no benefit -- the backend wouldn't act any different. But that's probably not what you mean. Turning the "flat" What if we have two flags? (something like "Sending events is disabled" and "Processing events is disabled") |
Fixes 1190150 (internal).
Principal change is that
TouchSimulation
now disablesPointer
devices (that aren't already Touchscreens) and reroutes their input into a simulatedTouchscreen
.Turns out this also fixes 1271942.