Search Issue Tracker
In Progress
Fix In Review for 6000.3.X
Under Consideration for 6000.4.X
Votes
0
Found in
2022.3.63f1
6000.0.53f1
6000.1.11f1
6000.2.0b9
6000.3.0a1
6000.4.0a1
6000.5.0a1
Issue ID
UUM-110585
Regression
No
FlexShrink fails when the first of two Label elements is set to FlexGrow="0" and the second is set to FlexGrow="1"
Reproduction steps:
1. Open the attached “IN-106329.zip” project
2. Open the “MyScene” Scene
3. From the Hierarchy, select the “GameObject”
4. In the Inspector, observe the ”MyClass (Script)” Component
5. Make the Inspector wider
6. Observe the green Label expanding while the orange one remains the same size
7. Shrink the Inspector so that it is less than 300px
8. Observe the Labels
Expected result: Both Labels start shrinking when the Width is less than 300px
Actual result: Only the green Label is shrinking and the orange remains the same size
Reproducible with: 2022.1.0a1, 2022.3.63f1, 6000.0.53f1, 6000.1.11f1, 6000.2.0b9, 6000.3.0a1
Reproducible on: Windows 11
Not reproducible on: no other environment tested
Notes:
- The core issue is that an element's flex-grow setting is incorrectly preventing it from shrinking. The 300px width is the critical point because each Label has a flex-basis of 150px (150px + 150px = 300px). The flex-shrink: 1 property on both labels means they should both shrink when the container becomes narrower than this. However, the flex-grow: 0 on the first label is incorrectly overriding this, making it a fixed size during shrinking
- The same incorrect behaviour can be reproduced using C# and a Custom Inspector, UXML and a Custom Inspector and the UI Builder. To test in the UI Builder - open the “MyUXML.asset” (Assets > Resources) and repeat the reproduction steps by narrowing the viewport
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Add comment