I’ve got a curious case of an UI element moving for a reason I can’t figure out.
The element doesn’t have any scripts attached to it and no other scripts are present in the scene that have any references to the element. Also, the only parent of the element are the root and 2D Screen objects.
Yet, the element still gets a visible offset in comparison to the way it appears in the editor, once the scene is launched. I logged its position to the console, but it’s returning the same value as the one that appears in the editor.
Can anyone please tell me if I’m missing something here or is this indeed an error? Thank you.
The left grey box ( the one that moves when the scene is launched) is the object that’s highlighted in the hierarchy. You can see from the 2nd picture I posted that the anchor values on it are (0,0,0,0).
Is that what you were asking, or ?
I checked the documentation but I still don’t understand what the value causing the size change that I started experiencing now could be.
The values on Sentence Button 1 that I have in my scene now are equal to the ones in the scene you linked.
Also, in my scene, Sentence Button 1 and Sentence Button 2 are almost identical to each other and by looking at them in the inspector I can’t pin-point any value that would cause such a change. Yet, Sentence Button 1’s size changes and Sentence Button 2’s doesn’t. And even if I make them swap positions, the Sentence Button 1 is still affected by the size change and the Sentence Button 2 isn’t.
Their status, as far as parent/child entity relationships go, are the same and their anchor values are also equal, just like their pivots. Is there some other setting I’m missing here?