Godot - Get viewport size
GDScript code example to get viewport size.
It is possible to get viewport size from "size" information obtained with get_viewport()
.
Get width and height as an array.
viewport_size = get_viewport().size
# (1152, 648)
WEB Design & Material Images
GDScript code example to get viewport size.
It is possible to get viewport size from "size" information obtained with get_viewport()
.
Get width and height as an array.
viewport_size = get_viewport().size
# (1152, 648)