You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing a C# script and trying to use FindChildren in my _Ready method.
My scene is like this with a root node with the script attached:
Calling FindChildren("face_*") is returning an empty array where I instead expect it to return a collection of the 6 nodes under cube_rounded.
If I call FindChild("face_*") instead it properly returns the face_front first node at the top of the tree, so the singular child function is working, but not the collection one.
FindChildren("Pivot") does find its immediate child, so it looks like maybe the recursive property is being ignored? Explicitly setting it to true changes nothing.
Steps to reproduce
Install C# version of Godot
Setup a 3D scene of nodes (any type) with hierarchy:
RigidBody3D (names not important here)
Pivot
cube_rounded
face_front
face_left
face_right
face_back
face_top
face_bottom
Create a new C# script on the root node inheriting from Node3D
Add var test = FindChildren("face_*"); in the _Ready() method
set a breakpoint in Visual Studio and debug the project
See after executing the line that test is an empty array instead of the 6 expected nodes.
Repros in 4.0.0-stable as well (checked for new version and tried on 4.0.1 when I saw it had released, same issue).
Minimal reproduction project
Minimal project with same structure above of just Node3D objects:
Godot version
4.0.1-stable_mono_win64
System information
Windows 10 19044
Issue description
I'm writing a C# script and trying to use
FindChildren
in my_Ready
method.My scene is like this with a root node with the script attached:
Calling
FindChildren("face_*")
is returning an empty array where I instead expect it to return a collection of the 6 nodes undercube_rounded
.If I call
FindChild("face_*")
instead it properly returns theface_front
first node at the top of the tree, so the singular child function is working, but not the collection one.FindChildren("Pivot")
does find its immediate child, so it looks like maybe therecursive
property is being ignored? Explicitly setting it totrue
changes nothing.Steps to reproduce
Node3D
var test = FindChildren("face_*");
in the_Ready()
methodSee after executing the line that test is an empty array instead of the 6 expected nodes.
Repros in 4.0.0-stable as well (checked for new version and tried on 4.0.1 when I saw it had released, same issue).
Minimal reproduction project
Minimal project with same structure above of just Node3D objects:
FindChildrenRepro.zip
Setup to output in Console:
Should see
Children Count: 6 expect 6
instead.Included the call to
FindChild
which shows the exact same pattern working to find a child there, but the aggregate call withFindChildren
fails.The text was updated successfully, but these errors were encountered: