You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func_ready() ->void:
# Set window size and center window for desktop devices.ifGlobal.os_platform=="Desktop":
# Workaround for:# https://github.com/godotengine/godot-proposals/issues/6247.# TODO: Reimplement this when there is better support for the above# issue in future Godot 4.x versions.varwindow: Window=get_window()
window.size=GameConfig.RESOLUTIONS[GameConfig.config.graphics.resolution]
@warning_ignore("integer_division")
window.position=Vector2i(
int(get_viewport_rect().size.x/2) -window.size.x/2,
int(get_viewport_rect().size.y/2) -window.size.y/2
)
Affects all projects in the repository.
The text was updated successfully, but these errors were encountered:
Will be possible when this proposal goes through and its PR gets merged: godotengine/godot-proposals#6247
Current workaround:
Affects all projects in the repository.
The text was updated successfully, but these errors were encountered: