diff options
Diffstat (limited to 'engine-ecs/src/component/storage.rs')
| -rw-r--r-- | engine-ecs/src/component/storage.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/engine-ecs/src/component/storage.rs b/engine-ecs/src/component/storage.rs index 98f8d46..7a49110 100644 --- a/engine-ecs/src/component/storage.rs +++ b/engine-ecs/src/component/storage.rs @@ -261,7 +261,7 @@ impl Storage pub fn add_entity_component( &mut self, entity_uid: Uid, - (component_id, component_name, component): (Uid, &'static str, Box<dyn Any>), + (component_id, component): (Uid, Box<dyn Any>), ) -> Result<(), Error> { let Some(archetype_id) = self.entity_archetype_lookup.get(&entity_uid) else { @@ -334,7 +334,7 @@ impl Storage entity.insert_component( component_id, - ArchetypeEntityComponent::new(component, component_name), + ArchetypeEntityComponent::new(component), add_edge_archetype, ); @@ -403,8 +403,7 @@ impl Storage .remove_entity(entity_uid) .expect("Entity should exist in archetype"); - let removed_component = - entity.remove_component(component_id, archetype_node.archetype()); + entity.remove_component(component_id, archetype_node.archetype()); self.graph .get_node_by_id_mut(remove_edge_id) @@ -418,7 +417,6 @@ impl Storage tracing::debug!( entity_id = %entity_uid, component_id = %component_id, - component_name = removed_component.name(), "Removed component from entity" ); |
