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

Open
RiscadoA opened this issue Dec 16, 2024 · 0 comments
Open

Add entity destruction detection to observers #1417

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

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
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

No branches or pull requests

1 participant