Function ecs_get_mut_id


#include <include/flecs.h>

FLECS_API void * ecs_get_mut_id(ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)


Get a mutable pointer to a component. This operation is similar to ecs_get_id but it returns a mutable pointer. If this operation is invoked from inside a system, the entity will be staged and a pointer to the staged component will be returned.

If the entity did not yet have the component, the component will be added by this operation. In this case the is_added out parameter will be set to true.


world - The world.

entity - The entity.

id - The entity id of the component to obtain.

The component pointer.


Line 1955 in include/flecs.h.