Common questions
Why would you use onready var versus regular var?
-
varis assigned when the script instance is created, if this is a node then it might not be added to the tree yet, so you can't useget_parentand similar on it. -
onready varis a shortcut for assigning vars in_ready()and is assigned a value after a node and siblings enter the tree. Only useful for nodes.
No comments to display
No comments to display