SceneTree

Inherits: MainLoop < Object

Category: Core

Brief Description

Member Functions

void call_group ( int flags, String group, String method, Variant arg0=NULL, Variant arg1=NULL, Variant arg2=NULL, Variant arg3=NULL, Variant arg4=NULL )
int change_scene ( String path )
int change_scene_to ( PackedScene packed_scene )
Node get_current_scene ( ) const
Object get_edited_scene_root ( ) const
int get_frame ( ) const
int get_node_count ( ) const
Array get_nodes_in_group ( String group )
Viewport get_root ( ) const
bool has_group ( String name ) const
bool is_debugging_collisions_hint ( ) const
bool is_debugging_navigation_hint ( ) const
bool is_editor_hint ( ) const
bool is_input_handled ( )
bool is_paused ( ) const
void notify_group ( 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_current_scene ( Node child_node )
void set_debug_collisions_hint ( bool enable )
void set_debug_navigation_hint ( bool enable )
void set_edited_scene_root ( Object scene )
void set_editor_hint ( bool enable )
void set_group ( int call_flags, String group, String property, Variant value )
void set_input_as_handled ( )
void set_pause ( bool enable )
void set_screen_stretch ( int mode, int aspect, Vector2 minsize )

Signals

  • connected_to_server ( )
  • connection_failed ( )
  • files_dropped ( PoolStringArray files, int screen )
  • fixed_frame ( )
  • idle_frame ( )
  • network_peer_connected ( int id )
  • network_peer_disconnected ( int id )
  • node_configuration_warning_changed ( Object node )
  • node_removed ( Object node )
  • screen_resized ( )
  • server_disconnected ( )
  • tree_changed ( )

Numeric Constants

  • GROUP_CALL_DEFAULT = 0
  • GROUP_CALL_REVERSE = 1
  • GROUP_CALL_REALTIME = 2
  • GROUP_CALL_UNIQUE = 4
  • STRETCH_MODE_DISABLED = 0
  • STRETCH_MODE_2D = 1
  • STRETCH_MODE_VIEWPORT = 2
  • STRETCH_ASPECT_IGNORE = 0
  • STRETCH_ASPECT_KEEP = 1
  • STRETCH_ASPECT_KEEP_WIDTH = 2
  • STRETCH_ASPECT_KEEP_HEIGHT = 3

Member Function Description

  • Node get_current_scene ( ) const
  • Node get_edited_scene_root ( ) const
  • 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_debugging_collisions_hint ( ) const
  • bool is_debugging_navigation_hint ( ) const
  • bool is_input_handled ( )
  • bool is_network_server ( ) const

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

  • bool is_input_handled ( )
  • bool is_paused ( ) const
  • bool is_refusing_new_network_connections ( ) 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_current_scene ( Node child_node )
  • void set_debug_collisions_hint ( bool enable )
  • void set_debug_navigation_hint ( bool enable )
  • void set_edited_scene_root ( Node scene )
  • void set_input_as_handled ( )

Set the peer object to handle the RPC system (effectively enabling networking). 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.

  • void set_pause ( bool enable )
  • void set_refuse_new_network_connections ( bool refuse )
  • void set_screen_stretch ( int mode, int aspect, Vector2 minsize, int shrink=null )