Function ecs_clone

Synopsis

#include <include/flecs.h>

FLECS_API ecs_entity_t ecs_clone(ecs_world_t *world, ecs_entity_t dst, ecs_entity_t src, bool copy_value)

Description

Clone an entity This operation clones the components of one entity into another entity. If no destination entity is provided, a new entity will be created. Component values are not copied unless copy_value is true.

Parameters

world - The world.

dst - The entity to copy the components to.

src - The entity to copy the components from.

copy_value - If true, the value of components will be copied to dst.

Returns
The destination entity.

Source

Line 1416 in include/flecs.h.