Scene Graph Find Entities
Query the scene for entities (by component or tag) to act on a group — all pickups, all spawn points, all doors. Loop the results and drive them.
Sometimes you don't want one door or one chest, you want ALL of them at once. Scene Graph lets you query the scene for a whole group.
Picture a conveyor belt: the query gathers every entity wearing your tag and feeds them past you, one crate at a time, in order.
First we define a tag, pickup_tag, like a sticker. We query the scene for every entity with that tag and store the list in Pickups. Then the for loop hands us each Pickup one at a time, and we call RemoveFromParent to despawn it.
Tag a group, query for it, loop the results. One rule drives them all.
pickup_tag := class(tag){}
Pickups := GetEntitiesWithTag(pickup_tag{})
for (Pickup : Pickups):
Pickup.RemoveFromParent()
Build your own lesson with scene_graph_find_entities
Generate a personalized, compile-checked lesson grounded in this exact reference.
Build a lesson →