I’ve come across a webgl issue that has me stumped in Unity 6000.0.22f1.
WebGL export takes 1/4 of the allotted space until I full screen the game, and go back, then it displays normally.
The input is processed as if the game was correctly displayed, so this seems to be purely a visual bug of some kind.
EDIT: The game also loads unfocused and doesn’t play any sound until I click somewhere in game window.
EDIT #2: Can’t repro in a fresh project, the fun begins.
That’s a new one for me, I haven’t seen that one before. If you find any clues, or can send a repo, I’m very curious. For the sound not playing until clicking the browser, that’s always been the case and is a browser security feature that keeps ads from blaring sound at you without explicitly clicking on them (unless the page is white listed by Google, like YouTube).
2 Likes
The only clue I have is that it was originally a 2022.3.45f1 LTS project, which I recently upgraded to Unity 6000.0.22f1 to see how viable a migration is. I’ll try to export current content via unitypackages and start anew in a fresh project from 0 since the game is still new and I can manage that within an hour or so. If that doesn’t work, I’ll have to come up with something else.
If you’re able to DM me a build (or maybe even the project if possible) I can figure out what it’s doing. For whatever reason it thinks the width and height is half of what it actually is, but I can’t think of what could possibly cause that, or how an upgrade might have triggered it.
Nevermind, not a bug or at least not fully the fault of the engine. The issue is with my half baked settings manager and something with how it applies screen resolution or other things along those lines.
EDIT: Yea, it happens if one tries to set screen resolution and/or refresh rate with Screen.SetResolution. The fix is to not do that on WebGL.
1 Like