Click or drag to resize

SceneTreeChangeScene Method

Changes the running scene to the one at the given path, after loading it into a PackedScene and creating a new instance.

Returns on success, if the path cannot be loaded into a PackedScene, or if that scene cannot be instantiated.

Note: The scene change is deferred, which means that the new scene node is added on the next idle frame. You won't be able to access it immediately after the ChangeScene(String) call.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public Error ChangeScene(
	string path
)

Parameters

path
Type: SystemString

[Missing <param name="path"/> documentation for "M:Godot.SceneTree.ChangeScene(System.String)"]

Return Value

Type: Error

[Missing <returns> documentation for "M:Godot.SceneTree.ChangeScene(System.String)"]

See Also