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

Add entity destruction detection to observers #1417

Closed
RiscadoA opened this issue Dec 16, 2024 · 0 comments · Fixed by #1458
Closed

Add entity destruction detection to observers #1417

RiscadoA opened this issue Dec 16, 2024 · 0 comments · Fixed by #1458
Assignees
Labels
A-Core B-ECS P-Urgent This issue is a big priority, and it would be good to close it ASAP
Milestone

Comments

@RiscadoA
Copy link
Member

RiscadoA commented Dec 16, 2024

Problem

Currently observers can detect removal of components, but not destruction of the entities themselves.

Solution

As we have .onRemove<Foo>, we should also have .onDestroy for querying over destroyed entities.
I'm not sure on whether these observers should run before or after the .onRemove observers for the components on the destroyed entities.

This could be also be used to implement #1418.

@RiscadoA RiscadoA added A-Core B-ECS P-Urgent This issue is a big priority, and it would be good to close it ASAP labels Dec 16, 2024
@kuukitenshi kuukitenshi added this to the 0.7 milestone Feb 10, 2025
@kuukitenshi kuukitenshi linked a pull request Feb 10, 2025 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Core B-ECS P-Urgent This issue is a big priority, and it would be good to close it ASAP
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants