Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # THIS:
- onready var foo = $Foo
- # IS THE SAME AS:
- var foo
- func _ready():
- foo = $Foo
- # IS THE SAME AS:
- onready var foo = get_node("Foo")
- # IS THE SAME AS:
- var foo
- func _ready():
- foo = get_node("Foo")
- # You could not do any of that and everytime you want to access "Foo" do:
- $Foo.some_func()
- # But then if "Foo" is not in the same location, for example you move it into $YSort/Foo,
- # now you would have to change every line that uses "Foo" to $YSort/Foo
Add Comment
Please, Sign In to add comment