Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Pin | |
Old Version | Published before Godot 3 was released. |
how to get root node using gdscript?
this code doesn’t work anymore in godot 3.0
get_tree().get_root().get_visible_rect().size
what are you trying to do?
getting viewport size?
func _ready():
print(get_tree().get_root().get_visible_rect().size)
this code works as expected with godot 3.0 in my case.
volzhs | 2017-12-25 18:05
Sorry for the late reply
I’m getting viewport size.
yes.
Strange This code now working! must be typo
Should i delete this post?
Pin | 2017-12-26 06:19
don’t have to
volzhs | 2017-12-26 06:35