public class SceneTree : MainLoop

Inheritance Chain


    public SceneTree()


    "connected_to_server" ()

    "connection_failed" ()

    "files_dropped" (PoolStringArray files, int screen)

    "idle_frame" ()

    "network_peer_connected" (int id)

    "network_peer_disconnected" (int id)

    "node_added" (Object node)

    "node_configuration_warning_changed" (Object node)

    "node_removed" (Object node)

    "physics_frame" ()

    "screen_resized" ()

    "server_disconnected" ()

    "tree_changed" ()


    public Node CurrentScene { get; set; }

    public bool DebugCollisionsHint { get; set; }

    public bool DebugNavigationHint { get; set; }

    public Node EditedSceneRoot { get; set; }

    public NetworkedMultiplayerPeer NetworkPeer { get; set; }

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 IsNetworkServer()) 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.

    public bool Paused { get; set; }

    public bool RefuseNewNetworkConnections { get; set; }

    public Viewport Root { get; }

    public bool UseFontOversampling { get; set; }


    public object CallGroup(string group, string method, params object[] args)

    public object CallGroupFlags(int flags, string group, string method, params object[] args)

    public Error ChangeScene(string path)

    public Error ChangeSceneTo(PackedScene packedScene)

    public SceneTreeTimer CreateTimer(float timeSec, bool pauseModeProcess = true)

    public Node GetCurrentScene()

Getter for CurrentScene

    public Node GetEditedSceneRoot()

Getter for EditedSceneRoot

    public int GetFrame()

    public int[] GetNetworkConnectedPeers()

    public NetworkedMultiplayerPeer GetNetworkPeer()

Getter for NetworkPeer

    public int GetNetworkUniqueId()

    public int GetNodeCount()

    public object[] GetNodesInGroup(string group)

    public Viewport GetRoot()

Getter for Root

    public int GetRpcSenderId()

    public bool HasGroup(string name)

    public bool HasNetworkPeer()

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

    public bool IsDebuggingCollisionsHint()

Getter for DebugCollisionsHint

    public bool IsDebuggingNavigationHint()

Getter for DebugNavigationHint

    public bool IsInputHandled()

    public bool IsNetworkServer()

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

    public bool IsPaused()

Getter for Paused

    public bool IsRefusingNewNetworkConnections()

Getter for RefuseNewNetworkConnections

    public bool IsUsingFontOversampling()

Getter for UseFontOversampling

    public void NotifyGroup(string group, int notification)

    public void NotifyGroupFlags(int callFlags, string group, int notification)

    public void QueueDelete(Object obj)

    public void Quit()

    public Error ReloadCurrentScene()

    public void SetAutoAcceptQuit(bool enabled)

    public void SetCurrentScene(Node childNode)

Setter for CurrentScene

    public void SetDebugCollisionsHint(bool enable)

Setter for DebugCollisionsHint

    public void SetDebugNavigationHint(bool enable)

Setter for DebugNavigationHint

    public void SetEditedSceneRoot(Node scene)

Setter for EditedSceneRoot

    public void SetGroup(string group, string property, object value)

    public void SetGroupFlags(int callFlags, string group, string property, object value)

    public void SetInputAsHandled()

    public void SetNetworkPeer(NetworkedMultiplayerPeer peer)

Setter for NetworkPeer

    public void SetPause(bool enable)

Setter for Paused

    public void SetQuitOnGoBack(bool enabled)

    public void SetRefuseNewNetworkConnections(bool refuse)

Setter for RefuseNewNetworkConnections

    public void SetScreenStretch(StretchMode mode, StretchAspect aspect, Vector2 minsize, float shrink = 1f)

    public void SetUseFontOversampling(bool enable)

Setter for UseFontOversampling

Inner Types


Name Value Description
Default 0  
Reverse 1  
Realtime 2  
Unique 4  


Name Value Description
Ignore 0  
Keep 1  
KeepWidth 2  
KeepHeight 3  
Expand 4  


Name Value Description
Disabled 0  
Viewport 2