SceneTree

Inherits: MainLoop < Object

Category: Core

Brief Description

Member Functions

Variant call_group ( String group, String method ) vararg
Variant call_group_flags ( int flags, String group, String method ) vararg
int change_scene ( String path )
int change_scene_to ( PackedScene packed_scene )
SceneTreeTimer create_timer ( float time_sec, bool pause_mode_process=true )
int get_frame ( ) const
PoolIntArray get_network_connected_peers ( ) const
int get_network_unique_id ( ) const
int get_node_count ( ) const
Array get_nodes_in_group ( String group )
int get_rpc_sender_id ( ) const
bool has_group ( String name ) const
bool has_network_peer ( ) const
bool is_input_handled ( )
bool is_network_server ( ) const
void notify_group ( String group, int notification )
void notify_group_flags ( int call_flags, String group, int notification )
void queue_delete ( Object obj )
void quit ( )
int reload_current_scene ( )
void set_auto_accept_quit ( bool enabled )
void set_group ( String group, String property, Variant value )
void set_group_flags ( int call_flags, String group, String property, Variant value )
void set_input_as_handled ( )
void set_quit_on_go_back ( bool enabled )
void set_screen_stretch ( int mode, int aspect, Vector2 minsize, float shrink=1 )

Signals

  • connected_to_server ( )
  • connection_failed ( )
  • idle_frame ( )
  • network_peer_connected ( int id )
  • network_peer_disconnected ( int id )
  • node_configuration_warning_changed ( Object node )
  • node_removed ( Object node )
  • physics_frame ( )
  • screen_resized ( )
  • server_disconnected ( )
  • tree_changed ( )

Member Variables

  • Node current_scene
  • bool debug_collisions_hint
  • bool debug_navigation_hint
  • Node edited_scene_root
  • NetworkedMultiplayerPeer network_peer - The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the SceneTree will become a network server (check with is_network_server()) and will set root node’s network mode to master (see NETWORK_MODE_* constants in Node), or it will become a regular peer with root node set to slave. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to SceneTree’s signals.
  • bool paused
  • bool refuse_new_network_connections
  • Viewport root
  • bool use_font_oversampling

Enums

enum GroupCallFlags

  • GROUP_CALL_DEFAULT = 0
  • GROUP_CALL_REVERSE = 1
  • GROUP_CALL_REALTIME = 2
  • GROUP_CALL_UNIQUE = 4

enum StretchMode

  • STRETCH_MODE_DISABLED = 0
  • STRETCH_MODE_2D = 1
  • STRETCH_MODE_VIEWPORT = 2

enum StretchAspect

  • STRETCH_ASPECT_IGNORE = 0
  • STRETCH_ASPECT_KEEP = 1
  • STRETCH_ASPECT_KEEP_WIDTH = 2
  • STRETCH_ASPECT_KEEP_HEIGHT = 3
  • STRETCH_ASPECT_EXPAND = 4

Member Function Description

  • int get_frame ( ) const
  • int get_network_unique_id ( ) const
  • int get_node_count ( ) const
  • int get_rpc_sender_id ( ) const
  • bool has_network_peer ( ) const

Returns true if there is a NetworkedMultiplayerPeer set (with SceneTree.set_network_peer).

  • bool is_input_handled ( )
  • bool is_network_server ( ) const

Returns true if this SceneTree’s NetworkedMultiplayerPeer is in server mode (listening for connections).

  • void notify_group ( String group, int notification )
  • void notify_group_flags ( int call_flags, String group, int notification )
  • void queue_delete ( Object obj )
  • void quit ( )
  • int reload_current_scene ( )
  • void set_auto_accept_quit ( bool enabled )
  • void set_input_as_handled ( )
  • void set_quit_on_go_back ( bool enabled )