Unity-Technologies / InputSystem

An efficient and versatile input system for Unity.
Other
1.43k stars 310 forks source link

FIX: ISXB-586 inputsystem sendpointerhovertoparent #1975

Closed benoitalain closed 1 month ago

benoitalain commented 2 months ago

Description

Jira ticket: https://jira.unity3d.com/browse/ISXB-586 Trunk PR: https://github.cds.internal.unity3d.com/unity/unity/pull/52658

Trunk PR needs to land first before this PR can be tested (and merged).

Changes made

Implements BaseInputModule sendPointerHoverToParent property for InputSystemUIInputModule. Also properly set PointerEventData reentered and fullyExited properties.

Testing

Manually tested the repro project with the fix. Added 6 unit tests (copied from the uGUI StandaloneInputModule-based tests).

Risk

Even though the changes are mostly copying the code from StandaloneInputModule, the changes are a bit interleaved with other new logic that only exists on the InputSystemUIInputModule side. The relation between those two classes is a bit of a mess (very little reuse of methods that have been put there in the spirit of being reused). I can't be entirely sure that this change is risk-free. I've tested the feature to a reasonable level, but I encourage any QA that knows uGUI more deeply to jump in.

Checklist

Before review:

During merge:

After merge:

benoitalain commented 1 month ago

Seems like the new changes need Editor version defines as it throws errors otherwise

I believe all the errors are fixed now.