Skip to content

Instantly share code, notes, and snippets.

@aindong
Created February 6, 2022 02:53
Show Gist options
  • Save aindong/26ba5ef9a4631203de0ec7921d7d047e to your computer and use it in GitHub Desktop.
Save aindong/26ba5ef9a4631203de0ec7921d7d047e to your computer and use it in GitHub Desktop.
Get 2d screen viewport in godot
var screen_size = Vector2.ZERO
# Called when the node enters the scene tree for the first time.
func _ready():
screen_size = get_viewport_rect().size
print(screen_size)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment