Function ecs_set_entity_range

Synopsis

#include <include/flecs.h>

FLECS_API void ecs_set_entity_range(ecs_world_t *world, ecs_entity_t id_start, ecs_entity_t id_end)

Description

Set a range for issueing new entity ids. This function constrains the entity identifiers returned by ecs_new to the specified range. This operation can be used to ensure that multiple processes can run in the same simulation without requiring a central service that coordinates issueing identifiers.

If id_end is set to 0, the range is infinite. If id_end is set to a non-zero value, it has to be larger than id_start. If id_end is set and ecs_new is invoked after an id is issued that is equal to id_end, the application will abort.

Parameters

world - The world.

id_start - The start of the range.

id_end - The end of the range.

Mentioned in

Source

Line 1079 in include/flecs.h.