mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
replacing find_node() with get_node() as find_node() doesnt exist anymore
Signed-off-by: Saif Kandil <74428638+k0T0z@users.noreply.github.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user