Skip to content

Conversation

hannem-rythmos
Copy link
Collaborator

@hannem-rythmos hannem-rythmos commented Aug 7, 2025

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.

  • Complexity: low
  • Halo Effect: low

Comments to reviewers

As localMultiPlayerRoot is having its own null check, we have removed the PlayerRoot null check in InitializePlayerRoot().

Checklist

Before review:

  • Changelog entry added.
    • Explains the change in Changed, Fixed, Added sections.
    • For API change contains an example snippet and/or migration example.
    • JIRA ticket linked, example (case %%). If it is a private issue, just add the case ID without a link.
    • Jira port for the next release set as "Resolved".
  • Tests added/changed, if applicable.
    • Functional tests Area_CanDoX, Area_CanDoX_EvenIfYIsTheCase, Area_WhenIDoX_AndYHappens_ThisIsTheResult.
    • Performance tests.
    • Integration tests.
  • Docs for new/changed API's.
    • Xmldoc cross references are set correctly.
    • Added explanation how the API works.
    • Usage code examples added.
    • The manual is updated, if needed.

During merge:

  • Commit message for squash-merge is prefixed with one of the list:
    • NEW: ___.
    • FIX: ___.
    • DOCS: ___.
    • CHANGE: ___.
    • RELEASE: 1.1.0-preview.3.

After merge:

  • Create forward/backward port if needed. If you are blocked from creating a forward port now please add a task to ISX-1444.

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.
@unity-cla-assistant
Copy link

unity-cla-assistant commented Aug 7, 2025

CLA assistant check
All committers have signed the CLA.

@hannem-rythmos hannem-rythmos changed the title [ISXB-1610] FIX for 1.4X: Impossibility to set InputSystemUIInputModule.localMultiPlayerRoot to null [ISXB-1610] FIX: Impossibility to set InputSystemUIInputModule.localMultiPlayerRoot to null Aug 7, 2025
@hannem-rythmos hannem-rythmos changed the title [ISXB-1610] FIX: Impossibility to set InputSystemUIInputModule.localMultiPlayerRoot to null FIX: Impossibility to set InputSystemUIInputModule.localMultiPlayerRoot to null Aug 7, 2025
@codecov-github-com
Copy link

codecov-github-com bot commented Aug 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

@@             Coverage Diff             @@
##           develop    #2222      +/-   ##
===========================================
- Coverage    68.11%   68.10%   -0.01%     
===========================================
  Files          367      367              
  Lines        53629    53628       -1     
===========================================
- Hits         36529    36526       -3     
- Misses       17100    17102       +2     
Flag Coverage Δ
linux_2021.3_pkg 5.46% <ø> (+<0.01%) ⬆️
linux_2021.3_project 70.37% <ø> (+<0.01%) ⬆️
linux_2022.3_pkg 5.23% <ø> (ø)
linux_2022.3_project 65.22% <ø> (+<0.01%) ⬆️
linux_6000.0_pkg 5.24% <ø> (ø)
linux_6000.0_project 67.97% <ø> (-0.04%) ⬇️
linux_6000.1_pkg 5.24% <ø> (ø)
linux_6000.1_project 68.01% <ø> (+<0.01%) ⬆️
linux_6000.2_pkg 5.24% <ø> (ø)
linux_6000.2_project 67.97% <ø> (-0.04%) ⬇️
linux_trunk_pkg 5.24% <ø> (ø)
linux_trunk_project 68.01% <ø> (+<0.01%) ⬆️
mac_2021.3_pkg 5.45% <ø> (+<0.01%) ⬆️
mac_2021.3_project 70.38% <ø> (+<0.01%) ⬆️
mac_2022.3_pkg 5.23% <ø> (ø)
mac_2022.3_project 65.24% <ø> (+<0.01%) ⬆️
mac_6000.0_pkg 5.23% <ø> (ø)
mac_6000.0_project 68.04% <ø> (+<0.01%) ⬆️
mac_6000.1_pkg 5.23% <ø> (ø)
mac_6000.1_project 68.04% <ø> (-0.01%) ⬇️
mac_6000.2_pkg 5.23% <ø> (ø)
mac_6000.2_project 68.04% <ø> (+<0.01%) ⬆️
mac_trunk_pkg 5.23% <ø> (ø)
mac_trunk_project 68.04% <ø> (+<0.01%) ⬆️
win_2021.3_pkg 5.46% <ø> (+<0.01%) ⬆️
win_2021.3_project 70.46% <ø> (+<0.01%) ⬆️
win_2022.3_pkg 5.23% <ø> (ø)
win_2022.3_project 65.32% <ø> (+<0.01%) ⬆️
win_6000.0_pkg 5.24% <ø> (ø)
win_6000.0_project 68.11% <ø> (+<0.01%) ⬆️
win_6000.1_pkg 5.24% <ø> (ø)
win_6000.1_project 68.11% <ø> (+<0.01%) ⬆️
win_6000.2_pkg 5.24% <ø> (ø)
win_6000.2_project 68.11% <ø> (+<0.01%) ⬆️
win_trunk_pkg 5.24% <ø> (ø)
win_trunk_project 68.11% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...m/InputSystem/Plugins/UI/MultiplayerEventSystem.cs 100.00% <ø> (ø)

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hannem-rythmos hannem-rythmos marked this pull request as ready for review August 7, 2025 12:56
Copy link
Collaborator

@LeoUnity LeoUnity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, adding Joao that might have a bit more insights on this area than me, and Paulius as the area QA

Copy link
Collaborator

@ekcoh ekcoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good to me, thanks for adding the test to cover the associated use-case.

@ekcoh
Copy link
Collaborator

ekcoh commented Aug 18, 2025

Branch needs an update based on develop and then a CI re-run to land. Seems like QA review is also pending.

Copy link
Collaborator

@jfreire-unity jfreire-unity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok to me, and also good to have at least 1 test added 👍

@Pauliusd01
Copy link
Collaborator

@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

@hannem-rythmos
Copy link
Collaborator Author

Hi @Pauliusd01 , could you please share the repro steps you tried?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants