Click or drag to resize

NodeFindNode Method

Finds a descendant of this node whose name matches mask as in String.match (i.e. case-sensitive, but "*" matches zero or more characters and "?" matches any single character except ".").

Note: It does not match against the full path, just against individual node names.

If owned is true, this method only finds nodes whose owner is this node. This is especially important for scenes instantiated through a script, because those scenes don't have an owner.

Note: As this method walks through all the descendants of the node, it is the slowest way to get a reference to another node. Whenever possible, consider using GetNode(NodePath) instead. To avoid using FindNode(String, Boolean, Boolean) too often, consider caching the node reference into a variable.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public Node FindNode(
	string mask,
	bool recursive = true,
	bool owned = true
)

Parameters

mask
Type: SystemString

[Missing <param name="mask"/> documentation for "M:Godot.Node.FindNode(System.String,System.Boolean,System.Boolean)"]

recursive (Optional)
Type: SystemBoolean

[Missing <param name="recursive"/> documentation for "M:Godot.Node.FindNode(System.String,System.Boolean,System.Boolean)"]

owned (Optional)
Type: SystemBoolean

[Missing <param name="owned"/> documentation for "M:Godot.Node.FindNode(System.String,System.Boolean,System.Boolean)"]

Return Value

Type: Node

[Missing <returns> documentation for "M:Godot.Node.FindNode(System.String,System.Boolean,System.Boolean)"]

See Also