SceneTree
Inherits: MainLoop < ObjectDescription
Manages the game loop via a hierarchy of nodes. The SceneTree manages the hierarchy of nodes in a scene, as well as scenes themselves. It’s in charge of the game loop.Properties
Node
The root node of the currently loaded main scene.
bool
default:"false"
If true, the scene tree is considered paused. Physics and processing stop.
Window
The tree’s root Window. This is the top-most Node of the scene tree.
Methods
change_scene_to_file
String
Path to the scene file to load
change_scene_to_packed
create_timer
reload_current_scene
quit
Signals
tree_changed()
Emitted any time the tree’s hierarchy changes.process_frame()
Emitted immediately before Node._process is called on every node in this tree.physics_frame()
Emitted immediately before Node._physics_process is called on every node.Example Usage
- GDScript
- C#