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

UI Toolkit

-

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.

  1. Resolution Note (fix version 2019.1):

    Fixed in 2019.1.5f1

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.