#include <include/flecs.h> FLECS_API ecs_entity_t ecs_get_typeid(const ecs_world_t *world, ecs_id_t id)
Get the type for an id. This operation returns the component id for an id, if the id is associated with a type. For a regular component with a non-zero size (an entity with the EcsComponent component) the operation will return the entity itself.
For a pair id the operation will return the type associated with the pair, by applying the following rules in order:
- The first pair element is returned if it is a component
- 0 is returned if the relationship entity has the Tag property
- The second pair element is returned if it is a component
- 0 is returned.
world- The world.
id- The id.
- The type id of the id.