- Home /
Canvas aspect ratio
Hey,
My game has a 270p rendertexture that is stretched to fit any resolution while maintaining it's 16:9 aspect ratio, the problem is that the UI Canvas has it's anchors to the corners of the screen and goes out of the game screen on non 16:9 displays, is there a way to keep the UI inside the game view without rendering it to a rendertexture?
try to set the canvas scaler scale mode to "Scale With Screen Size" and see if it works.
Yeah that's the mode i use and i want the UI to scale with the screen size, but on non 16:9 displays there will be two black bars at the bottom and the top of the game view, and the UI goes in those bars, i want it to stay within the game view
Answer by Khena_B · Jan 19, 2018 at 10:49 PM
Ah just figured it out, there is a component called Aspect Ratio Fitter, that worked perfectly.
Your answer
Follow this Question
Related Questions
How to see what the UI canvas will look like in the final build? 0 Answers
Unity crashes when using ExecuteAlways on a UIBehaviour 0 Answers
Display canvas on in game monitor 1 Answer
Issues with world space canvas for different resolutions. Any Workaround ? 0 Answers
Use the canvas scaler to resize UI on a RenderTexture's resolution ? 0 Answers