diff options
Diffstat (limited to 'ecs-macros/src')
-rw-r--r-- | ecs-macros/src/lib.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ecs-macros/src/lib.rs b/ecs-macros/src/lib.rs index a3ddc2a..21e8053 100644 --- a/ecs-macros/src/lib.rs +++ b/ecs-macros/src/lib.rs @@ -59,6 +59,11 @@ pub fn component_derive(input: TokenStream) -> TokenStream type RefMut<'component> = #ecs_path::system::ComponentRefMut<'component, Self>; + fn id(&self) -> #ecs_path::component::Id + { + #ecs_path::component::Id::of::<Self>() + } + fn as_any_mut(&mut self) -> &mut dyn std::any::Any { self |