bevyengine / bevyengine/bevy

Chained observers don't work when with OnRemove when entity is despawned

Open
#19,889 0 comments 0 reactions 0 assignees View on GitHub
A-ECS C-Bug S-Needs-Design
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## Bevy version

0.16.1

## What you did

```rust
fn on_remove(on_remove: Trigger, mut commands: Commands) {
commands.entity(on_remove.target()).trigger(OtherObserver);
}
```

## What went wrong

I was expecting the second observer to be run, but it panics with

```
The entity with ID was despawned by /home/.../.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bevy_ecs-0.16.1/src/spawn.rs:62:1
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.