- Home /
Build stuck in 4:3?
I've been having this issue for what feels like forever now where the resolution seems to be 4:3 in builds but works fine in the editor. I have a simple script that will set the resolution and toggle fullscreen.
public void AdjustResolution()
{
bool fullscreen = false;
if (PlayerPrefs.GetInt("fullscreen") == 1) fullscreen = true;
else fullscreen = false;
Screen.SetResolution(PlayerPrefs.GetInt("resolutionX"), PlayerPrefs.GetInt("resolutionY"), fullscreen);
Debug.Log("Resolution: " + Screen.width + " x " + Screen.height + ". Fullscreen: " + fullscreen);
}
But whenever I do a build, it seems to be stuck in 4:3 no matter what resolution I select. Here are my resolution settings in the player settings: And here's what my game looks like when 3440x1440 (my monitor's resolution) is selected in the resolution dropdown: You can see that 3440x1440 is clearly not what's being displayed. The Debug.Log statement always says the correct resolution, even though you can clearly see builds aren't displaying the correct resolution.
I'm working on version 2021.3.3f1 but also experienced this issue in the same project in version 2020.1.2f1. I've tried nearly everything I can think of at this point. Is there any possibility that since I'm using an ultrawide monitor, it's causing this?
Thanks in advance for any help!