Working with Entities
Accessing Components
Every behavior receives the entity it's attached to. Use it to read and modify components:
Warning
Always check the pointer before using it. get() and get_mut() return nullptr if the entity doesn't have that component.
Finding Other Entities
Look up entities by name using the ECS world:
Reading Components on Other Entities
Modifying Components on Other Entities
Creating Entities at Runtime
Iterating Over Entities
Use the Flecs each method to iterate over all entities with specific components: