diff options
Diffstat (limited to 'engine-ecs/src/actions.rs')
| -rw-r--r-- | engine-ecs/src/actions.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/engine-ecs/src/actions.rs b/engine-ecs/src/actions.rs index cbf996f..69605b3 100644 --- a/engine-ecs/src/actions.rs +++ b/engine-ecs/src/actions.rs @@ -78,12 +78,18 @@ impl Actions<'_> } /// Queues up despawning a entity at the end of the current tick. + #[tracing::instrument(skip_all, fields(%entity_uid))] pub fn despawn(&mut self, entity_uid: Uid) { debug_assert!(!entity_uid.is_pair()); let Some(ent) = self.world.get_entity(entity_uid) else { - tracing::warn!("Cannot entity that doesn't exist"); + // TODO: Support for this case should probably be added + + tracing::warn!( + "Cannot queue up despawn of an entity that doesn't currently exist" + ); + return; }; |
