-
-
Notifications
You must be signed in to change notification settings - Fork 21k
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_child method doesn't find a child by name after changing it's parent #93450
Comments
Does it work with |
|
Meant |
got it, I checked also other variants: |
Then it's expected, you haven't set the owner, the last argument filters only for owned nodes:
|
I see, thank you very much @AThousandShips ! |
Please open a proposal for that, this is not a bug, but the argument can't be changed to false by default without breaking compatibility so won't happen in 4.x I'd say |
I believe needs to be reopen because the behavior is inconsistent. it's not only about find_child but the whole chain of actions. |
Tested versions
reproducible in v4.2.2.stable.arch_linux
System information
Godot v4.2.2.stable unknown - Manjaro Linux #1 SMP PREEMPT_DYNAMIC Mon Jun 10 09:50:04 UTC 2024 - X11 - GLES3 (Compatibility) - AMD Radeon RX 7600 (radeonsi, navi33, LLVM 17.0.6, DRM 3.57, 6.9.3-3-MANJARO) () - AMD Ryzen 5 5600G with Radeon Graphics (12 Threads)
Issue description
when I print print_debug(player.get_children())
I see
[Head:<Node3D#30349984988>, CollisionShape3D:<CollisionShape3D#30400316699>]
but player.find_child("Head") returns null
Steps to reproduce
Node3D [Car]
CharacterBody3D [Player]
move the CharacterBody3D to the Car (Player.get_parent().remove_child(Player) and Car.add_child(Player))
and set the active camera to Cars camera (not required)
then move Player back to root
try to find Head Player.find_child("Head") -> result is null.
Minimal reproduction project (MRP)
later
The text was updated successfully, but these errors were encountered: