I want to make my sprite change at UI button so I have 2 sprite, I attach it the 1 at UI > button, I want to make it change if I click it so like this, check this image below. Because if I change it at pressed sprite my image become stretch and normally use size of my 1 image, then it only just press action not click then change click again change it back, how this is possible ?? any idea ??
I would probably wouldn’t swap the sprite in this case.
Instead I would:
-Resize the Folder image
-Hide/Show the Camera icon
If you set your sprite slices correctly, resizing it won’t affect the corners and/or top/bottom parts.
So, i would suggest researching/play a bit more with the UI system to find out how to enable/modify slicing.
hint, this thread might be useful: How to create a 9-sliced sprite and use it on new gui - Unity Engine - Unity Discussions
Only thing i can say is that when setting a Button in editor mode an giving it a sprite, and than assigning another sprite with different size, the sprite will be streched till you push the “Set Native Size” button
sry don’t get it
like @sluice said also would make it sliced
I mean for that, when I use the inspector there spriteswap action where we can change the sprite when highlitghted pressed or dissable. When I change it at pressed my sprite only change when I pressed after I release my press, it back to normal. That’s what I mean hahaha