Function ecs_get_object_w_id

Synopsis

#include <include/flecs.h>

FLECS_API ecs_entity_t ecs_get_object_w_id(const ecs_world_t *world, ecs_entity_t entity, ecs_entity_t rel, ecs_id_t id)

Description

Get the object of an entity. This will return a object of the entity that has the specified component. If the component is 0, the operation will return the first object that it finds in the entity type.

Parameters

world - The world.

entity - The entity.

rel - The relation between the entity and the object.

id - The entity id of a component that the object must have.

Returns
The object that has the specified id.

Source

Line 1717 in include/flecs.h.