From ec57daa9ef43eafea82769cee348da4dab192f16 Mon Sep 17 00:00:00 2001 From: HampusM Date: Fri, 29 Mar 2024 14:21:03 +0100 Subject: feat(ecs-macros): implement TypeName for components --- ecs-macros/src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ecs-macros/src/lib.rs') diff --git a/ecs-macros/src/lib.rs b/ecs-macros/src/lib.rs index e37d6a4..6fe343f 100644 --- a/ecs-macros/src/lib.rs +++ b/ecs-macros/src/lib.rs @@ -25,6 +25,14 @@ pub fn component_derive(input: TokenStream) -> TokenStream } impl ecs::system::Input for #item_ident {} + + impl ecs::type_name::TypeName for #item_ident + { + fn type_name(&self) -> &'static str + { + std::any::type_name::() + } + } } .into() } -- cgit v1.2.3-18-g5258