Clarify tree order in Using SceneTree (#5449)

Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
This commit is contained in:
Matthew
2021-12-14 05:05:29 -05:00
committed by GitHub
parent ef24412989
commit 0247f14e1e

View File

@@ -106,12 +106,19 @@ Tree order
----------
Most node operations in Godot, such as drawing 2D, processing, or getting
notifications are done in tree order. This means that parents and
siblings with a lower rank in the tree order will get notified before
the current node.
notifications are done in tree order, or top to bottom. For example, the
top node in a scene has its ``_ready()`` function called first, then the
node below it has its function called, then the node below that and so
on. However, children of a node will get called before their parent, also
in top to bottom order. So the top child node of the top node will get its
``_ready()`` function called first.
.. image:: img/toptobottom.png
This can also be overridden using the ``process_priority`` node property.
Nodes with a lower number are called first. For example, nodes with the
priorities "0, 1, 2, 3" would be called in that order (from left to right).
"Becoming active" by entering the *Scene Tree*
----------------------------------------------