amethyst / specs

Specs - Parallel ECS
https://amethyst.github.io/specs/
Apache License 2.0
2.49k stars 219 forks source link

Entity not being deleted #721

Closed ghmendonca closed 3 years ago

ghmendonca commented 3 years ago

Description

I can't delete entities inside my systems. When I call entities.delete(entity) it returns Ok(()) but the entity is never being removed. I know that is not being deleted because it's being iterated again in my systems and also when I call entities.is_alive(entity) it always returns true.

Meta

Rust version: 1.47.0 Specs version / commit: 1.16.1 Operating system: Windows 10

Reproduction

Capturar

Expected behavior

The entity should be deleted from the world.

ghmendonca commented 3 years ago

This other issue (https://github.com/amethyst/specs/issues/656) helped me to discover what was the problem, I actually have to call world.maintain() on every game tick so the entities can be removed.