Search Issue Tracker

Fixed in 2018.3.X

Votes

0

Found in

2017.4.1f1

Issue ID

1030671

Regression

Yes

UI.Image.SetNativeSize() changes the position when called after setting transform.position

uGUI

-

Reproduction steps:
1. Open the attached project "SetNativeSizeBug.zip";
2. Open the main scene;
3. Try to change something under Canvas -> Image, for example, untick and tick "Raycast Target", to make scene dirty;
4. Save all changes and enter a play mode;
5. In the game view press Move right and resize", then press "Move center and SetNativeSize buggy".

Expected results: the image should move back to the center and to the original size.
Actual results: the image is resized but the position is set to the value it had at the beginning of that frame.

Reproduced on: 2017.3.1p1, 2017.4.1f1, 2018.1.0f1.
Not reproduced on: 2017.2.2p4, 2017.3.1f1, 2018.2.0b1.

Note: The bug does not occur if you re-enter the play mode for the second time.

Fixed in: 2018.1.0f2, 2018.2.0b1.

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.