How to check nodes in group ?

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

How to check is there is any node in group ?

:bust_in_silhouette: Reply From: SIsilicon
get_tree().has_group("your group name")

The first method get_tree returns the SceneTree the node calling the method is in. And has_group checks if the SceneTree calling it has the group named “your group name”. The method returns true if the group exists, i.e. there is at least a node in the group.