Startup window size

I set my game resolution to 1920x1080,in game.project, when game launched on windows, it will start an window with dimension 1920x1080,it is too large, can i launch the game in other than the settings in game.project ?

imageimage
I suggest adding launch dimension in the game.project,both in windows and osx section

You can use DefOS to set the window size :smiley:

6 Likes

When can I invoke defos.set_window_size? I want the window be the size when it turned up, not setting it after it turned up, this will cause the window size changed after a short time when it turn up.

I think you should be able to call defos.set_window_size() outside the lifecycle functions to get it to resize as early as possible.

So right now I can just call defos.set_window_size() as early as possible?
Is it impossible for the window be the desired size at the moment when it show up?

I try to call set_window_size() in the update callback of an extension.but the window size still changed when the window show up.Here is my code:
image
I try to delay 1 frame

Yes. Is there a noticeable delay between the window showing up and being resized? If that is the case then I guess you could have a minimal bootstrap collection with a script and a proxy. The script would immediately call defos.set_window_size() and then proceed to load the rest of the game.

Not impossible, but you’d need to most likely create your own extension and use the same snippet of code as DefOS does and call that in your extension init code.