- Home /
cant set button back to original size and position after running 2d animation
I have buttons on a canvas and on start, I save there position and localScale into variables. I run an animation on a button moving it across the screen and then setActive false because it is not needed. Then when I click a reset button, I set it back to active, and set the position and localScale to the global variables that I set on start. However, the button does not look the same.
Attached are images of the original button, then what it looks like after I run the animation then set its local scale and position back to the original. It clearly gets distorted.
Everything is anchored down. I don't know if anchors are part of the problem or not but any help would be greatly appreciated. Thanks!
Your answer
![](https://koobas.hobune.stream/wayback/20220613005823im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Blender imported models reset position and scale. 1 Answer
Weird offset while Instantiating GameObject 1 Answer
Resetting a gameobjects position? 1 Answer
Positioning gameobjects by a corner, not by center 0 Answers
position and scale ratio; 0 Answers