瀏覽代碼

Clarify tree order in Using SceneTree (#5449)

Co-authored-by: Hugo Locurcio <[email protected]>
Matthew 3 年之前
父節點
當前提交
0247f14e1e
共有 1 個文件被更改,包括 10 次插入3 次删除
  1. 10 3
      tutorials/scripting/scene_tree.rst

+ 10 - 3
tutorials/scripting/scene_tree.rst

@@ -106,12 +106,19 @@ Tree order
 ----------
 ----------
 
 
 Most node operations in Godot, such as drawing 2D, processing, or getting
 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
 .. 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*
 "Becoming active" by entering the *Scene Tree*
 ----------------------------------------------
 ----------------------------------------------