pub unsafe extern "C" fn ecs_bulk_init(
world: *mut ecs_world_t,
desc: *const ecs_bulk_desc_t,
) -> *const ecs_entity_tExpand description
Bulk create/populate new entities. This operation bulk inserts a list of new or predefined entities into a single table.
The operation does not take ownership of component arrays provided by the application. Components that are non-trivially copyable will be moved into the storage.
The operation will emit OnAdd events for each added id, and OnSet events for each component that has been set.
If no entity ids are provided by the application, the returned array of ids points to an internal datastructure which changes when new entities are created/deleted.
If as a result of the operation triggers are invoked that deletes entities and no entity ids were provided by the application, the returned array of identifiers may be incorrect. To avoid this problem, an application can first call ecs_bulk_init to create empty entities, copy the array to one that is owned by the application, and then use this array to populate the entities.
@param world The world. @param desc Bulk creation parameters. @return Array with the list of entity ids created/populated.