diff options
Diffstat (limited to 'engine-ecs/src/entity.rs')
| -rw-r--r-- | engine-ecs/src/entity.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/engine-ecs/src/entity.rs b/engine-ecs/src/entity.rs index 4e0ca52..ba85956 100644 --- a/engine-ecs/src/entity.rs +++ b/engine-ecs/src/entity.rs @@ -322,7 +322,14 @@ macro_rules! declare_entity { $(#[$attr])* $visibility static $ident: $crate::entity::Declaration = $crate::entity::Declaration::new(|world| { - world.spawn_with_uid(*$ident, $components); + use $crate::tuple::Tuple; + + world.spawn_with_uid( + *$ident, + ($components).with_elem($crate::entity::Name { + name: concat!(module_path!(), stringify!($ident)).into() + }) + ); }); )+ } |
