- Home /
Unity 5.3 canvas scaling - Android
I have set a canvas property UI Scale Mode to Scale With Screen Size, set reference resolution to 720x1280 and put an image on canvas. When i tried an app on device, i saw that image doesn't fit the screen. It seems everything is ok with width, but image doesn't fit in height. How can i fix this?
Answer by JuliaYamamoto · Aug 24, 2016 at 08:11 PM
hmmm... Did you tried to set the Match to 0.5? (on the Canvas Scaler Component)
I tried it now but, as i expected, it is not a solution. $$anonymous$$atch property applies on both properties, width and height, and i need it to apply only on height.
I see... change the scrren match to mode to expand works? (nevcer used)
btw, did you set the pivot and position of your image to Strech? (on the rect transform component)
I set the image to be stretched and now everything is ok with image, but i have a problem with buttons. I put one of them on image about 100 px from image bottom side, but when i test it on device, this button is much closer to bottom side of image as it is not 100 but 30 px. I see that i should set button position to be relative with regard to image and not to canvas, but how to do it?