- Home /
Why does my game have letterboxes on the side?
I hit build and build and run for my 2D game in unity but when I play it there are letterboxes on the side. It happens in the built in player too. I have the aspect ratio set to 16:9 which I'm pretty sure is wide-screen but it still shows the letterboxes. Why is this happening? BTW I'm using a 1366 x 768 display I think
Well, that's a 4:3 aspect ratio, which explains the letterboxing...
Use http://docs.unity3d.com/ScriptReference/Screen-currentResolution.html to get the resolution your game is actually running in. In the editor it's likely that your game window isn't 16:9, and Unity has found a 16:9 resolution that does fit inside the game window.
Answer by Detinator10 · Aug 12, 2014 at 10:00 PM
It turned out that it just does that in the editor. However, in the real game (build and run) I simply set the default screen resolution to 1366 768 instead of the automatic default of 1024 768. I think the option for default screen res was in build settings.
Your answer
Follow this Question
Related Questions
the unity aspect ratio script looks good in computer but not in android phones 0 Answers
Why is the camera aspect ratio broken for the game tab? 0 Answers
Ortho camera viewport setup? 3 Answers
2D Camera Script 2 Answers
How to adjust desired camera size for all aspect ratios without having black edges? 0 Answers