diff options
author | HampusM <hampus@hampusmat.com> | 2025-09-23 18:22:44 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2025-09-23 18:22:44 +0200 |
commit | 9fcb8f884c3d302aa1a641a0b43fb6b011cef8db (patch) | |
tree | 435e3fac86ef0bd44ab466d23efb48774cf9f01a | |
parent | 20c45467612ff2448b87ce731f939145c6e3a3b1 (diff) |
feat(ecs): add component name to add component error msg
-rw-r--r-- | ecs/src/lib.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ecs/src/lib.rs b/ecs/src/lib.rs index 77d40db..8ce2e7b 100644 --- a/ecs/src/lib.rs +++ b/ecs/src/lib.rs @@ -500,11 +500,13 @@ impl World for component_parts in component_iter { let comp_id = component_parts.id(); + let comp_name = component_parts.name(); + if let Err(err) = component_storage.add_entity_component( entity_uid, - (comp_id, component_parts.name(), component_parts.into_data()), + (comp_id, comp_name, component_parts.into_data()), ) { - tracing::error!("Failed to add component to entity: {err}"); + tracing::error!("Failed to add component {comp_name} to entity: {err}"); continue; } |