Replies: 1 comment
-
Yup that's right, you would do: for (int i = 0; i < it->count; i ++) {
ecs_delete(it->world, it->entities[i]);
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
*Using the C api.
In my game, entities can have a lifetime component, and when that count reaches zero, the entity is to be removed from the storage system. How do i get the entity id stored (if it is) in the ecs_iter_t value that a query returns, so i can remove them? Something like:
Edit, I think I figured it out. The field i was searching for was the "entities" one, and the code seems to work.
Beta Was this translation helpful? Give feedback.
All reactions