Search Issue Tracker

Fixed in 5.4.0

Votes

1

Found in

5.1.0f3

Issue ID

707815

Regression

No

GameObject.SetActive() seems to affect assignment value to RectTransform.position

UI

-

To reproduce:
1. Import the package attached, open the project, go into the testScene. press play.
2. In game scene, press F, you will find the UI prefab is loaded. press F again, you will find the position of panel is reset.
3. If you disable the two setActive statements in start and update in script, or just delete them, you will find it turns to be OK. Press F once, and the position is reset at once.
4. Besides, if you use recttransform.anchoredPosition to replace recttransform.position, then everything is oK in both the two situations mentioned above.

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.