# Make UI Button Image Size Independent of Screen size Unity

I have two UI Buttons with image sprites in Panel (inside canvas). I have set their sizes to 40 in the inspector. If I run game in maximize mode, buttons retain constant assigned size of the inspector, instead of adjusting themselves with screen size. I have already added Canvas Scalar component with value Scale with Screen Size. Text fonts are able to adjust with screen size present in same canvas, but button with image does not.

Any guide on this? Thanks.

• Think of it this way: If your buttons are a bitmap graphic, then scaling them will result in blurry or pixelated buttons, fonts scale because they are vectors. An option can be to use several bitmap sizes for different screen sizes, but I don't know how to do that on Unity. Leaving this here as an idea for someone that knows. – rlam12 Sep 11 '16 at 22:33
• @rlam12 Thanks for the idea. I will look into it. – NightFury Sep 11 '16 at 22:41