Godot - Add to group
This shows how to add nodes to a group using GDScript in Godot 4.
You can add nodes to a group using add_to_group()
.add_to_group()
has the following characteristics:
- You can specify any group name as an argument
- If the group name does not exist, it will be newly created
add_to_group("group_name")