Преглед на файлове

replacing find_node() with get_node() as find_node() doesnt exist anymore

Signed-off-by: Saif Kandil <[email protected]>
Saif Kandil преди 1 година
родител
ревизия
6ae3d3beec
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      tutorials/plugins/running_code_in_the_editor.rst

+ 2 - 2
tutorials/plugins/running_code_in_the_editor.rst

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