mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
Update all instances of instance() to instantiate()
This commit is contained in:
@@ -203,7 +203,7 @@ current scene and replace it with the requested one.
|
||||
var s = ResourceLoader.load(path)
|
||||
|
||||
# Instance the new scene.
|
||||
current_scene = s.instance()
|
||||
current_scene = s.instantiate()
|
||||
|
||||
# Add it to the active scene, as child of root.
|
||||
get_tree().root.add_child(current_scene)
|
||||
@@ -236,7 +236,7 @@ current scene and replace it with the requested one.
|
||||
var nextScene = (PackedScene)GD.Load(path);
|
||||
|
||||
// Instance the new scene.
|
||||
CurrentScene = nextScene.Instance();
|
||||
CurrentScene = nextScene.Instantiate();
|
||||
|
||||
// Add it to the active scene, as child of root.
|
||||
GetTree().Root.AddChild(CurrentScene);
|
||||
|
||||
Reference in New Issue
Block a user