Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Viewport width/height initial window size are not respected when running the game in editor (floating window) #101691

Closed
Klaim opened this issue Jan 17, 2025 · 3 comments

Comments

@Klaim
Copy link

Klaim commented Jan 17, 2025

Tested versions

  • Reproducible in 4.4-beta1
  • not confirmed yet but I believe it was not reproducible in 4.4-dev7

System information

Godot v4.4.beta1 - Windows 11 (build 22631) - Multi-window, 2 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3080 Ti (NVIDIA; 32.0.15.6603) - AMD Ryzen 9 5900X 12-Core Processor (24 threads)

Issue description

The "viewport width/height` settings in a project are ignored for the initial window's size when running the game using F5/Debug.

For example, in a new project created using Godot 4.4-beta1, we can set:

Image

Note that the documentation is clear about these values not only being the viewport sizes but also the initial window size.

Image

However when running F5/Debug Play, the window (the new window from 4.4) will have a size completely unrelated, which is the last size it was set to in previous runs.

Image

What I expect: that window should always launch with the inner area at the size specified by viewport width/height of the project.

Notes:

  • I didn't consider the case of the embedded window in the editor, this case is ... lets say more tricky. I only consider this an issue with the floating window, as it makes harder to check the actual player experience when launching the game.
  • This issue doesn't occur when running the game outside the editor - that is, the parameters works fine in normal runs.
  • I need to double check later but I believe the issue was not there in Godot 4.4-Dev7, because I upgraded my project from Godot 4.3-stable and each 4.4 dev versions and didnt hit that issue before. I suspect the integration of the edition buttons in the floating game window started the issue.

Steps to reproduce

  1. Create a new project using Godot 4.4-beta1 (or upgrade an existing project (which was the case where I found the issue))
  2. Add an empty scene as default launch scene (so that it will run when we press F5).
  3. In the project's settings "Display/Window" set "Viewport Width/Height" to specific values (or even just note the default values)
  4. Run the game in-editor (F5) and observe the initial window size.

Minimal reproduction project (MRP)

N/A

@Klaim Klaim changed the title New debug game launch does not respect specified initial window size Viewport width/height initial window size are not respected when running the game in editor (floating window) Jan 17, 2025
@mnemoli
Copy link
Contributor

mnemoli commented Jan 17, 2025

+1, and it seems Editor Settings > Run > Window Placement settings also do nothing (Rect, Screen).

Kind of a separate issue but I also can't figure out how to switch between embedding and a separate window. The only way I could do it was by turning Multiwindow off completely in Editor Settings. Is there a setting I've missed somewhere?

@Hilderin
Copy link
Contributor

Hilderin commented Jan 18, 2025

That's a duplicate of: #100883

I made a suggestion in this issue that could prevent some confusion with the floating window: #101539 (comment)

@Hilderin
Copy link
Contributor

@mnemoli

Kind of a separate issue but I also can't figure out how to switch between embedding and a separate window. The only way I could do it was by turning Multiwindow off completely in Editor Settings. Is there a setting I've missed somewhere?

I'm not sure I understand correctly the issue, but the setting to switch between floating window and embedded is here:

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants