Incorrect resolution on first load after 4.6 update

Godot Version

v4.6.stable.steam [89cea1439]

Question

After updating to 4.6, the first time I ran my project, the game opened with the incorrect resolution, specifically with a height of 1051 pixels instead of 1080. If I change nothing and rerun the project, the resolution is correct. Every subsequent run is correct. If I close Godot and reopen, the first run uses the incorrect resolution again.

The project settings are for a 1920*1080 viewport. I tried also adding a Window Height Override of 1080 but nothing changed. I tried deleting the repo and pulling in case it was a caching problem, but nothing changed.

In case it matters, the project is a 2D game running in windowed mode, the stretch mode is canvas_items, all other window settings default. Running on Windows 11 (unfortunately).

Has anyone else experience this or figured out how to fix it?

That sounds like the size of your window with the title bar removed. It’s also what happens when the embedded Game Window is running. I’d disable that and see if it solves your problem.

Turning off embedding fixed it. Interestingly, when I turn embedding back on, the problem still doesn’t reappear. No idea what happened there. Thank you!

Many users have noticed that Godot 4.6 may not apply the correct viewport height on the first launch, even when project settings are set to 1920x1080. Switching the stretch mode or enabling a fixed window size at startup often fixes this kind of first-run resolution bug.

I would like to add that I ran into the same problem. My Godot version was 4.6.3.stable.mono. Here were some of my project settings that might be relevant:

  • Viewport Width: 850
  • Viewport Height: 600
  • Mode: Windowed
  • Aspect: keep
  • Scale Mode: integer

But when I ran my project after clearing the .godot/ cache, the actual resolution in the embedded game window was 712x503. All subsequent runs were the correct height of 850x600 as long as I didn’t clear the cache. Disabling the game embed fixed the issue and even after clearing the cache, if there was no game embed, the window size was always correct. Unlike what was said in this thread, turning the game embed back on did not fix the issue.