- Home /
Question by
Crown3d · Aug 14, 2020 at 09:38 AM ·
scripting problemuiui image
Sprite shrinks when selected?
I'm trying to use the swap sprite feature with buttons. Here is my button.
and here is the output.
I know that the button in the second image is "smaller" because the boarder makes it bigger, but it has to adapt to the size of the button, but is there a way to change the scale of the currently selected button through the event system, or other means?
Comment
Answer by Yword · Aug 14, 2020 at 03:47 PM
Hi Crown3d, maybe you can use Animation transition to change the button scale.
1) Change Button transition to Animation, then Auto Generate Animation.
2) In the Animation window, modify the scale of the Button.
3) You can adjust the transition duration to make it scale faster or slower.
buttontransition.jpg
(77.2 kB)