Click or drag to resize

NodeFindParent Method

Finds the first parent of the current 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.

Note: As this method walks upwards in the scene tree, it can be slow in large, deeply nested scene trees. Whenever possible, consider using GetNode(NodePath) instead. To avoid using FindParent(String) 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 FindParent(
	string mask
)

Parameters

mask
Type: SystemString

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

Return Value

Type: Node

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

See Also