Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clone entity with name cause internal error #1082

Closed
xubury opened this issue Nov 28, 2023 · 2 comments
Closed

Clone entity with name cause internal error #1082

xubury opened this issue Nov 28, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@xubury
Copy link

xubury commented Nov 28, 2023

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.

@xubury xubury added the bug Something isn't working label Nov 28, 2023
@SanderMertens
Copy link
Owner

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.

@SanderMertens
Copy link
Owner

Fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants