|Topic was automatically imported from the old Question2Answer platform.
I have a bit of a understanding problem what exactly
In the documentation I’ve read that it returns the
SceneTree, but what exactly does that mean? Does it return all
nodes that I have in my current
scene or does it return my
Maybe someone could help me clarify this
SceneTree is a class. See the reference docs for it: https://docs.godotengine.org/en/stable/classes/class_scenetree.html#class-scenetree. There is also a tutorial page for it in the docs: https://docs.godotengine.org/en/stable/getting_started/step_by_step/scene_tree.html
get_tree() returns an (or better the) instance of this class. The instance itself then has means to access the nodes inside it.
SceneTree itself is not a node, but a descendant of
MainLoop. Think of it as a manager class that takes care of updating and managing all the nodes in it while running in an infinite loop until the player exits the game (
ah I understand, thank you for the detailed answer!