Hi, I'm wondering if there is an easy way to see/print the current scene tree while my program is running? I'm trying to debug switching scenes, etc., and it would be nice if there was an easy way just to print out the whole thing.
Print Scene Tree
There is the print_tree function, which will print the scene tree. I don’t remember where it is located right off, but I think it is a function in the Node class. This Godot QA answer mentions the function and has some helpful tips for showing a scene.
That's it!
Also, is there a way that I mark my question answered, or do admins do that?
- Edited
You can do it as the topic author, but only if you started a question and not a discussion. If you hover over the new discussion button the right side end of it is actually a drop-down menu. From there you can choose to start a new question instead.
However in case you have started a discussion and would like to have it changed you can always just @ me or @TwistedTwigleg and we can change it for you, as I already did here. Cheers.
There's also print_tree_pretty()
if you want Godot to print a fancy tree using special characters :)