#include <include/flecs.h> FLECS_API void * ecs_get_mut_w_id(ecs_world_t *world, ecs_entity_t entity, ecs_id_t id, bool *is_added)
Get a mutable pointer to a component. This operation is similar to ecs_get_w_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.
is_added- Out parameter that returns true if the component was added.
- The component pointer.