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

Node.find_children() does not recurse with recursive=true #61608

Closed
vfig opened this issue Jun 1, 2022 · 4 comments
Closed

Node.find_children() does not recurse with recursive=true #61608

vfig opened this issue Jun 1, 2022 · 4 comments

Comments

@vfig
Copy link

vfig commented Jun 1, 2022

Godot version

v4.0.alpha8.official.cc3ed63af

System information

Windows 10

Issue description

Node.find_children() should recurse through all descendant nodes when recursive is true; so calling find_children("", "Node3D", true) should be returning all descendants that inherit from Node3D. But instead it only returns the immediate children, regardless of what is passed for recursive.

bug_find_children

Steps to reproduce

With the attached project, run the main scene, and check what is printed.

Minimal reproduction project

bug_find_children.zip

@yochrisbolton
Copy link

yochrisbolton commented Jun 1, 2022

Possibly related issue:
#54939 (comment)

Getting this same error with find_nodes. However, in my case, it can only actually find nodes that are one level below, regardless of the value of the recursive parameter.

#54939

@Calinou Calinou added this to the 4.0 milestone Jun 1, 2022
@fire
Copy link
Member

fire commented Jun 1, 2022

I recommend aligning the name / documentation instead of changing the behavior which needs a proposal.

@vfig
Copy link
Author

vfig commented Jun 1, 2022

Possibly related issue: #54939 (comment)

Yes, looks like the same cause. I hadn't noticed it previously, but i see there is a similar error in the debug log:

E 0:00:00:0913   _ready: Attempted to append_array a variable of type 'Array' into a TypedArray of type 'Object'.
  <C++ Error>    Condition "type != p_variant.get_type()" is true. Returning: false
  <C++ Source>   core/variant/container_type_validate.h:82 @ validate()

@vfig
Copy link
Author

vfig commented Jun 1, 2022

Duplicate of #54939

@vfig vfig closed this as not planned Won't fix, can't repro, duplicate, stale Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants