Ukendio / jecs

A fast, portable Entity Component System for Luau
https://ukendio.github.io/jecs/
MIT License
121 stars 20 forks source link

Clear components of entity #58

Closed Ukendio closed 2 months ago

Ukendio commented 2 months ago

Deleting an entity is not a trivial operation, when an entity is used as a component, it propagates deletion of archetypes and its contained entities. It also needs to set up the entity to be recycled.

Sometimes, you just want the entity to not get matched against queries again and want an easy way to deallocate its components' memory.