Created
February 6, 2022 02:53
-
-
Save aindong/26ba5ef9a4631203de0ec7921d7d047e to your computer and use it in GitHub Desktop.
Get 2d screen viewport in godot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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