-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Open
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsA-StatesApp-level states machinesApp-level states machinesC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorS-Needs-TestingTesting must be done before this is safe to mergeTesting must be done before this is safe to merge
Description
Bevy version and features
- 0.17.3
- default + serialize + experimental_bevy_feathers + bevy_dev_tools + track_location
What you did
I want to have observers spawned in when entering a state, and despawned when exiting the state. so i have a system spawning in an observer when entering it, and spawning them with the DespawnOnExit component:
commands.spawn((
Observer::new(handle_new_client),
DespawnOnExit(IsHost),
));What went wrong
- I'm expecting them to be despawned
- they don't get despawned
Additional information
the bevy system despawn_entities_on_exit_state does not have the With<Internal> or other filter, so will get ignored because of the DefaultQueryFilters.
If this is intended, i feel like maybe have that in the doc comment of DespawnOnExit and co?
I just noticed, the despawn_entities_on_enter_state system has an Allow<Disabled> filter
Metadata
Metadata
Assignees
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsA-StatesApp-level states machinesApp-level states machinesC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorS-Needs-TestingTesting must be done before this is safe to mergeTesting must be done before this is safe to merge