We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de3c70a commit ec2e512Copy full SHA for ec2e512
crates/bevy_ecs/src/observer/mod.rs
@@ -1160,4 +1160,23 @@ mod tests {
1160
world.flush();
1161
assert_eq!(vec!["event", "event"], world.resource::<Order>().0);
1162
}
1163
+
1164
+ #[test]
1165
+ fn observer_on_remove_during_despawn_spawn_empty() {
1166
+ let mut world = World::new();
1167
1168
+ world.observe(|_: Trigger<OnRemove, A>, mut cmd: Commands| {
1169
+ cmd.spawn_empty();
1170
+ });
1171
1172
+ world.flush();
1173
1174
+ let ent = world.spawn(A).id();
1175
1176
1177
1178
+ world.despawn(ent);
1179
1180
1181
+ }
1182
0 commit comments