check if a node has any children

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Aravash

How would I check if a node has any child at all?
has_node() is all i’ve found, but that’s specific to a node name

Node — Godot Engine (stable) documentation in English

if get_child_count() == 0:
    #Tada!

Magso | 2020-08-03 22:15

Thankyou! I knew it was something simple :slight_smile:

Aravash | 2020-08-03 22:23