How does _ready(): works?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By PHONK

I am a beginner and i don’t understand how _ready(): works!

:bust_in_silhouette: Reply From: Ninfur


_ready() is called when the node and its children have all been added to the scene tree and are ready.

See Understanding tree order :: Godot 3 Recipes for a detailed explanation

1 Like
:bust_in_silhouette: Reply From: magicalogic

When a scene is first loaded, this function is called. It is only called once. Use it to initialize variables or any other initializations you need.

Yo no sé cómo funciona eso me hablaste chino