Search Issue Tracker
Won't Fix
Votes
1
Found in
5.5.1f1
Issue ID
876835
Regression
No
[UI] Parent Content Size Fitter incorrectly recalculating on Descendant Changes
To reproduce:
1) Open attached project
2) Expand the hierarchy to the maximum possible
3) In one of the Item Containers, start disabling Items one by one and notice what happens with each disable. Then reenable them back one by one and again notice the changes
Expected: The parent fitter (Main Container) immediately resizes to the new amount of elements in it with no glitches
Actual: When disabling elements, Main Container Fitter always thinks there is one more element than disabled. This means that on first disable fitter doesn't do anything, on second disable it resizes to N-1 elements, not N-2 elements as it should. When reenabling, same problem happens, making the preview look squashed without any spacing. Both of these issues are only cosmetic - on launching the game, the fitter fixes itself
4) Play the scene
5) Repeat step 3
Expected: The parent fitter (Main Container) immediately resizes to the new amount of elements in it with no glitches
Actual: When disabling, the fitter only resizes at every second disable. So if there was originally 5 elements in ItemContainer, the main container would only resize on 3 and 1 elements. The same applies when resizing the elements back. Because this is now in play, this can only be fixed by forcefully moving Main Container, which invalidates Fitter's purpose.
Reproduced in 5.5.0b11, 5.5.1f1, 5.6.0b7
Can't test in 5.5.0b10 and older as most of Rect Transform settings are disabled when using such setup, resulting in broken layout
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Android] Stage information is not logged when Log Shader Compilation is enabled
- [Vulkan] The memory allocation increases rapidly when there are multiple (three or more) Real-Time Reflection Probes in the Scene
- [macOS] Library folder of the opened project can be deleted which leads to the crash
- “Default Scene” dropdown field contains a spelling mistake “Default Builtin”
- Editor crashes on PPtr<Mesh> after adding Text Mesh and Cloth Components to the same GameObject
Add comment