summaryrefslogtreecommitdiff
path: root/ecs/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ecs/src/lib.rs')
-rw-r--r--ecs/src/lib.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/ecs/src/lib.rs b/ecs/src/lib.rs
index fbcc451..0bc7aa6 100644
--- a/ecs/src/lib.rs
+++ b/ecs/src/lib.rs
@@ -48,6 +48,7 @@ struct Entity
pub struct EntityComponent
{
pub id: TypeId,
+ pub name: &'static str,
pub component: Lock<Box<dyn Component>>,
pub drop_last: bool,
}
@@ -90,6 +91,7 @@ impl World
ManuallyDrop::new(EntityComponent {
id: (*component).type_id(),
+ name: component.type_name(),
component: Lock::new(component),
drop_last,
})
@@ -187,6 +189,7 @@ impl World
ManuallyDrop::new(EntityComponent {
id: (*component).type_id(),
+ name: component.type_name(),
component: Lock::new(component),
drop_last,
})