Repository navigation
FIX: [Port] [UUM-137448] Fixed layout merge for controls declared for several variants - #2505
Merged
josepmariapujol-unity merged 2 commits intoNov 10, 2026
Conversation
…or several variants CreateLookupTableForControls appended each variant to the previous key, so a control with variants "A;B" was stored under "name@a" and "name@a@b" but never "name@b". A derived layout overriding the control for the second variant found nothing to merge with and lost the base control's layout, offset, format and usages. Port of input/fix-multi-variant-control-merge from the unity repo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
💡 Harness Review
The change correctly builds independent lookup keys for each variant, and the regression test checks inheritance under both variants. I examined the surrounding merge and variant-matching behavior, test setup, and changelog and found no actionable issues.
Reviewed commit 2c43cab
🤖 Helpful? 👍/👎
Codecov ReportAll modified and coverable lines are covered by tests ✅ @@ Coverage Diff @@
## develop #2505 +/- ##
===========================================
+ Coverage 78.96% 79.21% +0.24%
===========================================
Files 767 769 +2
Lines 140949 141263 +314
===========================================
+ Hits 111305 111898 +593
+ Misses 29644 29365 -279
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Collaborator
Author
|
Collaborator
Author
|
All test pass! 🟢 |
Collaborator
Author
|
Given that fix is just one line ( |
josepmariapujol-unity
deleted the
backport/input/fix-multi-variant-control-merge
branch
November 10, 2026 13:44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Backport of: https://github.cds.internal.unity3d.com/unity/unity/pull/137448
A control declared for "
lefty;righty" was stored undercustom@leftyandcustom@lefty@righty, but never undercustom@righty. So a derived layout that overrode it for righty lost the base control's layout, offset, format and usages. The fix builds every lookup key from the control name.Testing status & QA
New test
Layouts_ControlDeclaredForSeveralVariants_MergesUnderEachOfThem.Overall Product Risks
since it's a one-line change that only affects multi-variant controls in layouts that another layout extends.
Comments to reviewers
Please describe any additional information such as what to focus on, or historical info for the reviewers.
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.