After upgrading to Unity version 5.5.1f from 5.4.1f got a bug:
I have a UI with elements, anchored to sides and corners of canvas.
If I hide an element by:
element.gameObject.SetActive(false);
and after
element.gameObject.SetActive(true);
element appears at canvas center. In editor (“Scene” window) I checked it’s position - it’s OK, according to anchor. But sprite image placed at canvas center!
If after this, element is updated or canvas size is changed - elements return to their anchored positions.
There are two screens below, after activation of gameObject and after canvas resize (it must looks so from beginning):
How can I fix it?