Flecs List Components
flecs_list_componentsLists component, tag, and pair IDs in a FLECS application with storage statistics to inspect ECS world composition and memory usage.
Instructions
[READ] List the component, tag and pair ids in use, with storage statistics.
Each entry has 'name', 'entity_count', 'entity_size', 'tables' (table ids), 'traits' (e.g. Exclusive, CanToggle, (OnDelete,Remove)), 'type' (size, alignment, which lifecycle hooks are set; absent for tags), 'sparse' (for sparse components) and 'memory' when the stats module is imported. Includes FLECS builtin ids and wildcard records. Returns {total, offset, limit, components}; total counts matches after filtering. Use flecs_get_type_info for a component's member schema.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of items to return. | |
| offset | No | Number of items to skip (for paging). | |
| name_contains | No | Only return entries whose name contains this text (any case). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | Yes | ||
| total | Yes | ||
| offset | Yes | ||
| components | Yes |