The function allows you to resize the window to fit the screen while keeping the camera in the middle of the scene without unexpected displacement.
How to use the extension
An important condition for correct operation is to set the game resolution to 1280 horizontally and 720 vertically, you also need to check the box "change the width to fit the screen size" and the checkbox "update the resolution while playing".
Description
The function allows you to resize the window to fit the screen while keeping the camera in the middle of the scene without unexpected displacement.
How to use the extension
An important condition for correct operation is to set the game resolution to 1280 horizontally and 720 vertically, you also need to check the box "change the width to fit the screen size" and the checkbox "update the resolution while playing".
Checklist
Example
https://games.gdevelop-app.com/game-60d3910d-88ec-4fae-81c8-702b1a6f70db/index.html
Extension file
ResizeTheWindowToFitTheScreen.zip