-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
DespawnOnEnter/DespawnOnExit no longer working on Observers #21579
Copy link
Copy link
Closed
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesSimple bug fixes and API improvements, docs, test and examplesP-RegressionFunctionality that used to work but no longer does. Add a test for this!Functionality that used to work but no longer does. Add a test for this!S-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!
Metadata
Metadata
Assignees
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesSimple bug fixes and API improvements, docs, test and examplesP-RegressionFunctionality that used to work but no longer does. Add a test for this!Functionality that used to work but no longer does. Add a test for this!S-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!
Bevy version and features
Version 0.17
What you did
Since #20204, can no longer be despawned by using the
DespawnOnEnter/DespawnOnExitcomponents. This is due to them beingInternalentities and thus they are not queried in the systems responsible for despawning entities.bevy/crates/bevy_state/src/state_scoped.rs
Lines 72 to 76 in adf8211
bevy/crates/bevy_state/src/state_scoped.rs
Lines 138 to 142 in adf8211
Is this intended or should observers be able to be despawned?