Search Issue Tracker
Fixed in 2019.1.X
Votes
0
Found in
2019.1.0a5
2019.1.4f1
2019.2.0a1
2019.3.0a1
Issue ID
1159893
Regression
Yes
Content Size Fitter Component becomes ineffective when Image Source of Image UI Element is re-assigned via script
How to reproduce:
1. Open the "SampleScene" in the attached "case_1159893repro.zip" Unity project
2. Press Play and continually press the "Click" Button
3. Observe the effect in the Game view
Expected result: when the Sprite changes, the Preferred Size of the Content Size Fitter Component gets recalculated
Actual result: the Sprite changes, but the Preferred Size property stays set to the parameters of the first Sprite
Reproducible with: 2019.1.4f1, 2019.2.0b3, 2019.3.0a3
Not reproducible with: 2017.4.29f1, 2018.4.2f1, 2019.1.0a4
Note: the issue is not reproducible on the first attempt at re-assigning the Image Source, but reproduces every time after the first try. Reproducible on Unity versions 2019.1.0a5 through 2019.1.4f1, 2019.2.0a1 through 2019.2.0b3 and 2019.3.0a1 through 2019.3.0a3.
Add comment
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
Resolution Note (fix version 2019.1):
Fixed in 2019.1.5f1