Material Box

Material Box

WEB Design & Material Images

Godot - Get group

Godot

This is how to get a group using GDScript in Godot 4.


You can add nodes to a group using get_nodes_in_group().

get_nodes_in_group() has the following features:
- Specify any group name as an argument
- An error will occur if you specify a non-existent group name

enemies = get_tree().get_nodes_in_group('enemies')

Godot

TitleGodot - Get group

CategoryGodot

Created

Update

AuthorYousuke.U