|
|
|
 |
Reply From: |
rainlizard |
I figured out that setting Borderless
to true in Project Settings, then setting it to false in _ready() is fixing it. (don’t forget to save the project in order to apply the Project Setting!)
It’s possible that this issue is only present on Windows, I don’t know.
Here’s some other tricks:
Put the window off screen: OS.set_window_position(Vector2(1000000000,1000000000))
Then do a bunch of yield(get_tree(), "idle_frame")
Until your window is loaded, then do: OS.center_window()
Using OS.window_minimized
seems to prevent OS.set_window_size
from working when used on the same frame so I don’t bother with it.
To disable the “Boot Splash”, set the Image filename to a nonsense filename that doesn’t exist. (again, don’t forget to save the project in order to apply Project Settings)
To disable the “Boot Splash”, set the Image filename to a nonsense filename that doesn’t exist. (again, don’t forget to save the project in order to apply Project Settings)
It’s better to use a 1×1 black or transparent PNG instead to avoid errors in the console when running the project. See this proposal.
Calinou | 2021-03-24 14:50
Setting it to a 1x1 black or transparent PNG is not hiding the Boot Splash. The “Bg Color” option of the Boot Splash cannot be made transparent, so it doesn’t matter how small you make the image, the Bg Color will always be visible. “Fullsize” option only affects the size of the image shown in the middle of the Bg Color background.
It looks like this: https://i.imgur.com/XD6lqyn.png
The red is the Boot Splash “Bg Color”.
Godot Icon is the Boot Splash “Image” and can be replaced with a 1x1 image or transparent PNG, won’t make a difference.
You can hide both the Bg Color and the Boot Splash image by using the nonsense filename method (I don’t mind some errors as long as it’s hidden) plus setting the window to be initially Borderless (set back to false in _ready). If you don’t use Borderless then the Boot Splash with nonsense filename will be white but if you do then it’ll be completely invisible.
To clarify, the Borderless setting is now fixing TWO different issues here. The Boot Splash and the initial resizing.
rainlizard | 2021-03-24 21:59