Home > other >  Godot: application is not fullscreen
Godot: application is not fullscreen

Time:02-18

When I run my game, the test window display correctly my game, but not when I run on my android phone. The game is resize and a grey rectangle appears at the bottom of the screen.

Screen of the phone

The project's parameters

CodePudding user response:

It appears that:

  • The Stretch Aspect is set to Expand on the project settings -> general -> display -> window (this setting is not visible on the picture, you need to scroll down). See Multiple resolutions.
  • And you are either:
    • Not using Controls for the UI.
    • Or you didn't set the layout to Full. See Size and anchors.
  • The default clear color is Gray (which is the default) on project settings -> general -> rendering -> environment. You can change the color to match your background. Or if you are mainly using solid color backgrounds, you can use that instead of a ColorRect or whatever you are using.

Test your game on desktop, windowed (not full-screen) and resizable (and not borderless). That way you can and resize the window to different sizes to see how it behaves. I remind you that different smartphones have different screen sizes.

Unrelated: you need allow hidpi to have the game window show up at all in some monitors.

  • Related