SceneTree¶
Category: Core
Brief Description¶
Member Functions¶
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¶
- int change_scene_to ( PackedScene packed_scene )
- SceneTreeTimer create_timer ( float time_sec, bool pause_mode_process=null )
- Node get_current_scene ( ) const
- Node get_edited_scene_root ( ) const
- int get_frame ( ) const
- PoolIntArray get_network_connected_peers ( ) const
- int get_network_unique_id ( ) const
- int get_node_count ( ) const
- Viewport get_root ( ) 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_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 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_edited_scene_root ( Node scene )
- void set_input_as_handled ( )
- void set_network_peer ( NetworkedMultiplayerPeer peer )
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 )