[Help] Screen resolution isn't constant when web build is done

Hi everyone, Juan over here again!

I’ve got 95% of the project done and quite happy to notice how far I’ve gone with this course. Now my resolution screen in the Unity interface is different to the resolution in the gamebucket website.

Further description:

Menu and Win screen are quite smaller than the game scene. Besides, the score in the Game scene is out of place.

Desired behaviour:

To have all screen at the same resolution and to keep the gameobjects in place.

Things I’ve tried:

So far I’ve set the resolution 800x600 in the player settings “Resolution and presentation” tab.

I’ve clicked on the aspect tap of the Game window and set it up to web 800X600 and to 4:3 none of them have worked.

I’ve done some research on the web and all suggestions point to the same two solutions described above.

A little bit of help is most appreciated

Cheers!

Juan

1 Like

Hi, juan

Can you post an image of your Game Scene in the unity editor with scene view tab opened.

OR
better yet,
upload your project on GitHub, and provide a link to it in your reply…

1 Like

I realize that you’ve probably already solved this, but I’m gonna leave a possible solution here anyway.
Maybe it helps someone else, if not you.

If you have a high-DPI screen (like many gaming-laptops do) Windows actually scales stuff differently.
Right click on Unity (or it’s shortcut), go to the properties.
Go to the “compatibility”-tab.
Check “disable DPI scaling”.

Now next time you run Unity it should use normal scaling.
Text will be smaller, probably looks a bit unfamiliar at first.

But most importantly, your game will actually be scaled the way it should be.
Of course this means that your game’s UI elements will appear to have moved, since in reality they were in the wrong place the whole time.
Once you fix them to this new scaling they should be exactly in the same place they are in the web build.

If this was your issue, you should note that other programs can act funky with scaling, too.
If you’ve ever had a program with blurry text (a web browser perhaps?), chances are it’s being messed up by the scaling.

1 Like

Hi Sami!

Thank you very much for giving me some assistance with this issue! The DPI scaling is disabled I’m afraid. Although, I think that editing the game in Unity 2017 instead of the 4. something version improved the scaling. There’s just one last thing and it’s the score display. No matter how many times I place it back to the expected position it’s got fixed differently when built !

Sami I’m quite glad you took time to answer this question! Of all honesty I thought nobody would do that, so I appreciate your help

Cheers!

LaserDefenderInGameScreenShot|690x388

2 Likes

1 Like