Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | JokerDDZ |
How to check is there is any node in group ?
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | JokerDDZ |
How to check is there is any node in group ?
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.