Clone entity with name cause internal error
xubury opened this issue · comments
xubury commented
Describe the bug
Cloning a named entity cause fatal error. Is it because flecs do not allow entity with same name? Can I skip name value copy to avoid?
To Reproduce
ecs.entity().clone(); // ok
ecs.entity("potato").clone(); // fatal: name_index.c: 210: INTERNAL_ERROR
ecs.entity("potato").clone(true, ecs.entity("tomato")); // fatal: name_index.c: 210: INTERNAL_ERROR
Expected behavior
Clone named entity without error.
Sander Mertens commented
This is a known issue of the clone function- no two entities with the same name can exist under the same parent entity. I'll take a look at this.
Sander Mertens commented
Fixed!