- Home /
How to make button stay the same size on all screens?
So I've made a Canvas and have added a button to it. The thing is whenever I do a build and run it on my phone, the button is smaller, but on the editor it is the normal size.
I was wondering if there is a setting where the button will stay the same size no matter what screen the button is on?
What UI Scale $$anonymous$$ode are you using in your Canvas Scaler? Using 'Constant Physical Size' should do it.
that's the default and usually not working
What do you mean by same size? Should your button be of fixed size OR should your button change according to the screen size? Please elaborate for further assistance.
Answer by $$anonymous$$ · Oct 01, 2018 at 09:25 PM
'Constant physical size' should maintain the buttons size, in pixels. This means that if you scale your screen size up, the button will appear smaller in relation, even if it is actually the same. You can make the button scale with the size of the screen, in it's Canvas Scaler options, under 'UI Scale Mode'.
Answer by hydrox1 · Oct 01, 2018 at 08:39 PM
Well hi, this is quite easy, all you need to do is use the rect transforming options, and combine them with Canvas Scalar and you will never have this problem again. It will scale to any size. You also have a lot of tutorials on how to use the rect transforming options and theyre pretty easy once you understand. I hope my answer was helpful.
Your answer
Follow this Question
Related Questions
How to instantiate a prefab between Canvas and a Button? 0 Answers
full screen and resolution 1 Answer
On Click paramaters disappear from button prefab? 5 Answers
If button highlighted 2 Answers