CompiledFrog

Post #42: _enter_tree() and _ready()

According to the Godot docs:

Intro

Two functions allow you to initialize and get nodes besides the class's constructor: _enter_tree() and _ready().

You are able to override both of these functions in order to define behavior as you best see fit.

_enter_tree()

_enter_tree() is called on a node when the node enters the scene tree.

_ready()

Called once in a node's lifetime, after enter_tree().

_ready() ensures that all children have entered the scene tree first, so you can safely call get_node() on them.

Check out the docs here!