Skip to content

Commit b2f6169

Browse files
authored
Merge pull request godotengine#8301 from k0T0z/fix-scenes-code-examples
Replacing `find_node()` with `get_node()` as `find_node()` doesn't exist
2 parents 257cd8b + 6ae3d3b commit b2f6169

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tutorials/plugins/running_code_in_the_editor.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ If you are using :ref:`EditorScript<class_EditorScript>`:
329329

330330
func _run():
331331
# `parent` could be any node in the scene.
332-
var parent = get_scene().find_node("Parent")
332+
var parent = get_scene().get_node("Parent")
333333
var node = Node3D.new()
334334
parent.add_child(node)
335335

@@ -342,7 +342,7 @@ If you are using :ref:`EditorScript<class_EditorScript>`:
342342
public override void _Run()
343343
{
344344
// `parent` could be any node in the scene.
345-
var parent = GetScene().FindNode("Parent");
345+
var parent = GetScene().GetNode("Parent");
346346
var node = new Node3D();
347347
parent.AddChild(node);
348348

0 commit comments

Comments
 (0)