Updating change_scene and change_scene_to (#6175)

* Updating change_scene and chnage_scene_to

solves #6156
This commit is contained in:
Kirrby
2022-10-05 07:57:40 -03:00
committed by GitHub
parent 3d619dc8a6
commit 9d9d4b821c
5 changed files with 11 additions and 11 deletions

View File

@@ -115,7 +115,7 @@ Custom scene switcher
This tutorial will demonstrate building a scene switcher using autoloads.
For basic scene switching, you can use the
:ref:`SceneTree.change_scene() <class_SceneTree_method_change_scene>`
:ref:`SceneTree.change_scene_to_file() <class_SceneTree_method_change_scene_to_file>`
method (see :ref:`doc_scene_tree` for details). However, if you need more
complex behavior when changing scenes, this method provides more functionality.
@@ -208,7 +208,7 @@ current scene and replace it with the requested one.
# Add it to the active scene, as child of root.
get_tree().root.add_child(current_scene)
# Optionally, to make it compatible with the SceneTree.change_scene() API.
# Optionally, to make it compatible with the SceneTree.change_scene_to_file() API.
get_tree().current_scene = current_scene
.. code-tab:: csharp
@@ -241,7 +241,7 @@ current scene and replace it with the requested one.
// Add it to the active scene, as child of root.
GetTree().Root.AddChild(CurrentScene);
// Optionally, to make it compatible with the SceneTree.change_scene() API.
// Optionally, to make it compatible with the SceneTree.change_scene_to_file() API.
GetTree().CurrentScene = CurrentScene;
}