FIX: Impossibility to set InputSystemUIInputModule.localMultiPlayerRoot to null#2222
Conversation
Added a new test to verify UI navigation and submit actions using a gamepad when the event system's playerRoot (localMultiPlayerRoot) is set and when it is null. Ensures navigation and submit functionality work correctly in both scenarios.
Codecov ReportAll modified and coverable lines are covered by tests ✅ @@ Coverage Diff @@
## develop #2222 +/- ##
========================================
Coverage 68.14% 68.15%
========================================
Files 367 367
Lines 53662 53661 -1
========================================
+ Hits 36570 36572 +2
+ Misses 17092 17089 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
LeoUnity
left a comment
There was a problem hiding this comment.
Looks good to me, adding Joao that might have a bit more insights on this area than me, and Paulius as the area QA
ekcoh
left a comment
There was a problem hiding this comment.
Change looks good to me, thanks for adding the test to cover the associated use-case.
|
Branch needs an update based on develop and then a CI re-run to land. Seems like QA review is also pending. |
jfreire-unity
left a comment
There was a problem hiding this comment.
Looks ok to me, and also good to have at least 1 test added 👍
|
@hannem-rythmos do you have any suggestions on how I should test this one? I've tried setting it to null and I'm unable to with and without the PR, I must be doing something wrong |
|
Hi @Pauliusd01 , could you please share the repro steps you tried? |
Pauliusd01
left a comment
There was a problem hiding this comment.
Tried again via reflection and I guess I can set it to null, not sure if there's anything "real" for me to check besides that
Description
Case ISXB-1610] (https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1610)
This PR removes the null check in MultiplayerEventSystem.InitializePlayerRoot() that prevented setting InputSystemUIInputModule.localMultiPlayerRoot to null. We found that the check was introduced in PR #1547, but no specific reason was provided
Since localMultiPlayerRoot is already safely used (e.g., in IsMoveAllowed() via its own null check), we have removed the null check.
Testing status & QA
Added a UnityTest to validate that setting InputSystemUIInputModule.localMultiPlayerRoot to null allows full UI navigation as expected.
Overall Product Risks
Please rate the potential complexity and halo effect from low to high for the reviewers. Note down potential risks to specific Editor branches if any.
Comments to reviewers
As localMultiPlayerRoot is having its own null check, we have removed the PlayerRoot null check in InitializePlayerRoot().
Checklist
Before review:
Changed,Fixed,Addedsections.Area_CanDoX,Area_CanDoX_EvenIfYIsTheCase,Area_WhenIDoX_AndYHappens_ThisIsTheResult.During merge:
NEW: ___.FIX: ___.DOCS: ___.CHANGE: ___.RELEASE: 1.1.0-preview.3.After merge: