Keep button's image size same as original sprite
I create an UI button after which I decide to change its source image with the sprite I want. It works fine, the problem is that the size is the same as the button's size initially and not as big as the sprite I add. The artist have made all the button sprites with a certain size and I have to readjust the size every single time I add the sprite to the Source Image.
How can I make the button's size be as big as the sprite that I add as a Source Image?
yeah, sry I haven't added enough detail. I know that I have to readjust it from there to what the size of the sprite is every time but what I was trying to find out is whether there is a way for this action to happen automatically when adding the sprite.
Answer by tonysameh · Jun 18, 2018 at 06:37 AM
I figured out the solution. My sprite pixel per unit was set to 190, while my Canvas reference pixel per unit was 100. If they are set to the same number, the Button will have the same sprite size.