Click or drag to resize

SceneTreeChangeSceneTo Method

Changes the running scene to a new instance of the given PackedScene.

Returns on success or if the 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 ChangeSceneTo(PackedScene) call.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public Error ChangeSceneTo(
	PackedScene packedScene
)

Parameters

packedScene
Type: GodotPackedScene

[Missing <param name="packedScene"/> documentation for "M:Godot.SceneTree.ChangeSceneTo(Godot.PackedScene)"]

Return Value

Type: Error

[Missing <returns> documentation for "M:Godot.SceneTree.ChangeSceneTo(Godot.PackedScene)"]

See Also