Hi devs, this wasn’t always an issue but making a simple 2d game, I somehow provoked an issue where Unity is building and running my game in a low resolution…
fixes?
I’ve combed through both my code, build settings, and camera/canvas settings = they all point toward my game running in 2560 x 1440 (also my monitor res)
My code: any code I have regarding Display and Screen is a super simple startup code I made in a second.
I made it for redundancy, with or without this code the screen is always blurry.
Screen.SetResolution(2560, 1440, true);
The two attached images are my (low) resolution build, and a brand new project built and ran, (normal) res.
I’ve been at it for a few days so any ideas or help would be greatly appreciated. <3
More details: This all started when I had wanted to make a settings menu, the code I wanted to use would not cooperate with my camera/canvas rendering options and I changed a few things and the code was still broken, since then, I had deleted the code and forgot what I set to cause this issue…
my old code had involved finding display size > setting screen size. + a bunch of preset sizes to pick from in settings. and a seperate code involved toggling windowed and fullscreen modes. This was all scrapped and is no longer in the game.
Could it be possible that the code somehow permanently changed Unity’s startup resolution??
If I were to mock up a rough(and unlikely to run) rendition of my scripts they would look like this.
public class ResolScript : MonoBehavior
{
// for a (auto detect resolution) button in settings
void AutoDetectRes()
{
Screen.SetResolution(Display.systemWidth, Display.systemHeight, true);
}
//preset resolution buttons
void TwokRes()
{
Screen.SetResolution(2560,1440, true);
}
void TenEightyRes()
{
Screen.SetResolution(1920, 1080, true)
}
//for fullscreen, windowed toggle, Not sure how I did this part
//but I know I used the FullScreenMode method,
//Im going to guess how my monkey brain did it the first time.
void GetFullscreen()
{
FullScreenMode.FullScreenWindow(Screen.currentResolution, true)
}
void GetWindowed()
{
FullScreenMode.Windowed(Screen.currentResolution, true)
}
}
This code was for in-build buttons, the buttons would wonk out and do things like not reflect the proper resolution, the resolution was often low, and the fullscreen/window toggle wouldn’t toggle properly (upon using my brain it may be because they are toggles, bools, and not single executables, like a button should be.)
PERHAPS They toggled a resolution state in which I never UNTOGGLED before I deleted the script?? is that possible gang?