|
@@ -17,7 +17,7 @@ scenes which one instances and adds to the tree at runtime:
|
|
|
func _add_a_scene_manually():
|
|
|
# This is like autoloading the scene, only
|
|
|
# it happens after already loading the main scene.
|
|
|
- get_tree().get_root().add_child(simultaneous_scene)
|
|
|
+ get_tree().root.add_child(simultaneous_scene)
|
|
|
|
|
|
.. code-tab:: csharp
|
|
|
|
|
@@ -32,7 +32,7 @@ scenes which one instances and adds to the tree at runtime:
|
|
|
{
|
|
|
// This is like autoloading the scene, only
|
|
|
// it happens after already loading the main scene.
|
|
|
- GetTree().GetRoot().AddChild(simultaneousScene);
|
|
|
+ GetTree().Root.AddChild(simultaneousScene);
|
|
|
}
|
|
|
|
|
|
To complete the cycle and swap out the new scene with the old one,
|
|
@@ -124,11 +124,11 @@ a scene's data between scene changes (adding the scene to the root node).
|
|
|
.. tabs::
|
|
|
.. code-tab:: gdscript GDScript
|
|
|
|
|
|
- get_tree().get_root().add_child(scene)
|
|
|
+ get_tree().root.add_child(scene)
|
|
|
|
|
|
.. code-tab:: csharp
|
|
|
|
|
|
- GetTree().GetRoot().AddChild(scene);
|
|
|
+ GetTree().Root.AddChild(scene);
|
|
|
|
|
|
Perhaps instead they wish to display multiple scenes at the same time using
|
|
|
:ref:`SubViewportContainers <class_SubViewportContainer>`. This is optimal in
|