WebGL resolution different than Unity Editor resolution

Hi guys!
I want to upload my game to itch as WebGL. I have a screen resolution of 960x540 set in Player Settings, which is also the size of the main menu background image. After I exported it, uploaded it to itch & started it, I see that Unity ignored my screen size settings! There is a white outline on my background image (Ill attach a picture) and when I start the level, it fills the complete screen (also, the UI gets fecked up, but I think you get my point ). So, Unity made the screen resolution bigger than I wanted. How can I fix this?


(Pictures: How it looks in itch vs in Unity) Yes, I am sure that I set my resolution in player settings to 960x540, and it is not a problem of itch, when I make the size smaller there, I see mainly the white in the upper left corner.

So… is there any other way the resolution can be influenced than the player settings? I am using Unity 2021.3.1f1.

Kind regards
Paul

I suspect that the white border has nothing to do with Unity’s resolution or rendering. It’s more likely part of the frame the Unity is drawing its content in. With a default WebGL build you get these labels and controls at the bottom of the window, that’s part of the web content where the Unity WebGL renderer is wrapped in.

I cannot advise on this since I never edited the WebGL template, but that’s what you most likely need to look at.