diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-04-10 07:50:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-10 07:50:10 +0200 |
commit | 866cb2805fd9f0d3346952e97156681170eb214c (patch) | |
tree | 6d8adfc184ae743034c490f4d317c3bbd8c45f31 /doc | |
parent | ca1312dbe95b885786b541220857039f4411bcaa (diff) | |
parent | 8362ce4769b65f47c0d5d5a11d262a28a144e526 (diff) |
Merge pull request #17080 from simedis/pretty_print_tree
Made Node.print_tree() print prettily
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/Node.xml | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 9129f64340..ffc6b96abd 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -453,7 +453,30 @@ <return type="void"> </return> <description> - Prints the scene hierarchy of this node and all it's children to stdout. Used mainly for debugging purposes. + Prints the tree to stdout. Used mainly for debugging purposes. This version displays the path relative to the current node, and is good for copy/pasting into the [method get_node] function. Example output: + [codeblock] + TheGame + TheGame/Menu + TheGame/Menu/Label + TheGame/Menu/Camera2D + TheGame/SplashScreen + TheGame/SplashScreen/Camera2D + [/codeblock] + </description> + </method> + <method name="print_tree_pretty"> + <return type="void"> + </return> + <description> + Similar to [method print_tree], this prints the tree to stdout. This version displays a more graphical representation similar to what is displayed in the scene inspector. It is useful for inspecting larger trees. Example output: + [codeblock] + ┖╴TheGame + ┠╴Menu + ┃ ┠╴Label + ┃ ┖╴Camera2D + ┖-SplashScreen + ┖╴Camera2D + [/codeblock] </description> </method> <method name="propagate_call"> |