- Home /
Webplayer - How to preserve aspect ratio in full screen?
Hi, I'm trying to set my webplayer game to full screen but I can't preserve the aspect ratio. I tried using Screen.SetResolution and changing the default resolution in Standalone Player Settings. What else can I do?
Edit: My game works at 3:2 aspect-ratio. Native resolution: 1080x720
Answer by ArnoC · Apr 22, 2015 at 09:56 AM
Use Direct3D 9 instead of 11 => boom, it works! (at least for me) And I have no glitches with D3D9, whereas with D3D11 my windows are a bit messed up once I leave fullscreen mode in my web player game.
It's true though that the desktop resolution settings corresponds (roughly) to the web player fullscreen resolution setting, but only with D3D9.
I was using Direct3D 9 all time. Anyway I know that fullscreen mode just works with the supported resolutions of the monitor, so it's not posible to virtualize another aspect ratio.
Normally if the aspect ratio doesn't fit the screen exactly, black bars should appear on the sides. Does it work for you at all?
It will work just if it's one of the compatible resolutions. What I wanted was to keep the 3:2 aspect ratio, but monitors normally don't support resolutions with this aspect ratio, so unity change it to another compatible (16:9 or 4:3)
Your answer
![](https://koobas.hobune.stream/wayback/20220613185829im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
webplayer resolution problems/issues/oddities and frame rate weirdness 6 Answers
Build game in portrait aspect without blue borders? 0 Answers
Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers
Aspect Ratio vs Fixed Resolution 1 Answer
Keep Aspect ratio/Letterbox and maintain pixel perfection 0 Answers