Function ecs_bulk_new_w_data

Synopsis

#include <include/flecs.h>

FLECS_API const ecs_entity_t * ecs_bulk_new_w_data(ecs_world_t *world, int32_t count, const ecs_entities_t *component_ids, void *data)

Description

Create N new entities and initialize components. This operation is the same as ecs_bulk_new_w_type, but initializes components with the provided component array. Instead of a type the operation accepts an array of component identifiers (entities). The component arrays need to be provided in the same order as the component identifiers.

Parameters

world - The world.

components - Array with component identifiers.

count - The number of entities to create.

data - The data arrays to initialize the components with.

Returns
The first entity id of the newly created entities.

Source

Line 880 in include/flecs.h.