2
0
Эх сурвалжийг харах

Merge pull request #8301 from k0T0z/fix-scenes-code-examples

Replacing `find_node()` with `get_node()` as `find_node()` doesn't exist
Matthew 1 жил өмнө
parent
commit
f6ae328403

+ 2 - 2
tutorials/plugins/running_code_in_the_editor.rst

@@ -322,7 +322,7 @@ If you are using :ref:`EditorScript<class_EditorScript>`:
 
 
     func _run():
     func _run():
         # `parent` could be any node in the scene.
         # `parent` could be any node in the scene.
-        var parent = get_scene().find_node("Parent")
+        var parent = get_scene().get_node("Parent")
         var node = Node3D.new()
         var node = Node3D.new()
         parent.add_child(node)
         parent.add_child(node)
 
 
@@ -335,7 +335,7 @@ If you are using :ref:`EditorScript<class_EditorScript>`:
     public override void _Run()
     public override void _Run()
     {
     {
         // `parent` could be any node in the scene.
         // `parent` could be any node in the scene.
-        var parent = GetScene().FindNode("Parent");
+        var parent = GetScene().GetNode("Parent");
         var node = new Node3D();
         var node = new Node3D();
         parent.AddChild(node);
         parent.AddChild(node);