- Home /
Canvas will not fit to screen upon build
I did not change anything that should have made this happen but suddenly the build is compressed. It was full screen upon build a few days ago.
It looks good from the editor.
I am not sure how to fix it, I feel like I have tried everything on here. I tried removing the image from the background, playing with the aspect ratios and resolution, changing the fullscreen modes in player settings, changing the render and UI scale mode of the canvas... I must be overlooking something simple.
Anyone have any idea what happened or how I fix this?
Answer by RedNivar · Jun 14, 2021 at 05:16 AM
In canvas scaler component of your main canvas. Set the UI scale mode to "Scale with screen size" and then set your desired screen resolution in the "reference resolution" property.
So, I did try to do that, I matched the screen resolution with that of my monitor and it still had extra room on the sides. I tried altering the resolution from there but it never quite fit -- it either had extra blue space on the sides or cut off the top and bottom :(
@AnnaVicVic make the Rect Transform of your image to stretch.
Yeah, maybe the canvas is scaling, but your image is not. Did you set up the anchors properly?
Your answer
Follow this Question
Related Questions
Use the canvas scaler to resize UI on a RenderTexture's resolution ? 0 Answers
How to covert a rectTransform scale to world scale? 1 Answer
Why are the elements of my scrollview scaled different after refreshing? 0 Answers
Move UI object in Canvas with different resolutions 1 Answer
Layout error after crash has effected canvas scaling 1 Answer