Function ecs_ref_init_id

Synopsis

#include <include/flecs.h>

FLECS_API ecs_ref_t ecs_ref_init_id(const ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)

Description

Create a component ref. A ref is a handle to an entity + component which caches a small amount of data to reduce overhead of repeatedly accessing the component. Use ecs_ref_get to get the component data.

Parameters

world - The world.

entity - The entity.

id - The id of the component.

Returns
The reference.

Source

Line 2005 in include/flecs.h.