- Home /
The question is answered, right answer was accepted
Camera Changes Proportions In Build
I have been having a problem with my camera whenever I build my standalone game (using Unity version 2017.3.0f3). The camera stays at its proper height, but it widens horizontally about 1/3 of a unit on each side, revealing areas of the scenes that aren't supposed to be seen. This problem doesn't happen in the Unity Editor. I have already made sure that the resolution (1200x800) in the build is the same as in the Unity Editor.
If it helps, here is a picture of my game being played in the Unity Editor:
And here is a picture of it being played as a .exe file:
Also, here are the resolution and presentation settings for my game:
Default Is Fullscreen: true
Default Is Native Resolution: false
Default Screen Width: 1200
Default Screen Height: 800
Mac Retina Support: true
Run In Background: false
Capture Single Screen: false
Display Resolution Dialog: Disabled
Use Player Log: false
Resizable Window: false
Mac Fullscreen Mode: Fullscreen Window
D3D11 Fullscreen Mode: Fullscreen Window
Visible In Background: true
Allow Fullscreen Switch: false
Force Single Instance: true
And none of the aspect ratios are supported (since Resolution Dialog is disabled).
Thanks in advance for your help!
Answer by kylecat6330 · Jul 04, 2020 at 07:21 PM
I'm not really an expert on the subject, and I'm not really sure what could be causing it or how to fix it. However, you could work around it by setting up a script so that it covers the parts of the screen you shouldn't be able to see. The simplest way to do this would probably be to just use a Rect to make some black rectangles on the edges of the camera view.
Although like I said I am no expert on the subject this is just a possible work around.
Thank you so much for your response! I really appreciate it! Thankfully, I was able to find the solution to my problem. Simply put, my computer doesn't support a resolution height of 800 pixels, so it set the height to 768 pixels, messing up the proportions of my camera view. But again, thank you for your suggestion! I really like the idea of rectangles on the edges of the camera view, and I will definitely keep it in $$anonymous$$d as I make other games.
Follow this Question
Related Questions
Player Settings Standalone resolution will not change? 0 Answers
"Couldn't switch to requested monitor resolution" 1 Answer
Resolution Not Saving On Build 2 Answers
Distribute terrain in zones 3 Answers