Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

find_children returns [] if match string is given #63757

Closed
sairam4123 opened this issue Aug 1, 2022 · 1 comment · Fixed by #75459
Closed

find_children returns [] if match string is given #63757

sairam4123 opened this issue Aug 1, 2022 · 1 comment · Fixed by #75459
Milestone

Comments

@sairam4123
Copy link

sairam4123 commented Aug 1, 2022

Godot version

v4.0.alpha13.official [59dcddc45]

System information

Windows 11, Nvidia GeForce GTX 1050, 27.21.14.5771

Issue description

find_children method of Node returns empty list even if it is looking for a node with a name is present in the tree!
It finds the node if the match_string is "*".

Steps to reproduce

find_children("*name*", "", true, true)  # returns []
find_children("*") # returns [nodes! whoohoo!]

Minimal reproduction project

MRP.zip

@sairam4123 sairam4123 changed the title find_children returns [] if match string is given find_children returns [] if match string is given Aug 1, 2022
@Chaosus Chaosus added this to the 4.0 milestone Aug 1, 2022
@Chaosus Chaosus moved this to To Assess in 4.x Priority Issues Aug 1, 2022
@heppocogne
Copy link
Contributor

heppocogne commented Aug 1, 2022

This might be because find_children only searches for the children nodes whose names match the match_string.

image

In this case, find_children("A*","",true,true) would returns ["A", "A/Alpha"] but not "B/Alpha".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
4 participants