From 3c117bcd9455ffbcec5cd59dab37db0786e15e02 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 29 Nov 2026 21:16:11 +0100 Subject: feat(engine-ecs): change meaning of component name to type identifier --- engine-ecs/src/component/storage.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'engine-ecs/src/component/storage.rs') 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), + (component_id, component): (Uid, Box), ) -> 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" ); -- cgit v1.2.3-18-g5258