diff options
| author | HampusM <hampus@hampusmat.com> | 2026-12-02 15:28:38 +0100 |
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2026-12-02 15:28:38 +0100 |
| commit | 76774063632fd05f6e62709f69458821cf9307bf (patch) | |
| tree | d6316d6f74fa36f978ebb2bb058824eead0d6532 /engine-ecs-macros/src | |
| parent | b2a130a6e30b82a7e0f80347f916265a467a4238 (diff) | |
feat(engine-ecs): add component::Info of_component & of_sole fns
Diffstat (limited to 'engine-ecs-macros/src')
| -rw-r--r-- | engine-ecs-macros/src/lib.rs | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/engine-ecs-macros/src/lib.rs b/engine-ecs-macros/src/lib.rs index 1cae24b..3a025fb 100644 --- a/engine-ecs-macros/src/lib.rs +++ b/engine-ecs-macros/src/lib.rs @@ -136,12 +136,7 @@ pub fn component_derive(input: TokenStream) -> TokenStream { #ecs_path::component::Parts::builder() .component_info( - #ecs_path::component::Info::default() - .with_name(<#item_ident as Component>::name()) - .with_type_name(std::any::type_name::<#item_ident>()) - .with_type_reflection( - <#item_ident as Component>::type_reflection() - ) + #ecs_path::component::Info::of_component::<#item_ident>() ) .build( <#item_ident as #ecs_path::component::WithAssociatedId>::id(), @@ -263,11 +258,7 @@ pub fn sole_derive(input: TokenStream) -> TokenStream { #ecs_path::component::Parts::builder() .component_info( - #ecs_path::component::Info::default() - .with_name(<#item_ident as Sole>::name()) - .with_type_name(std::any::type_name::<#item_ident>()) - .with_is_sole(true) - .with_type_reflection(<#item_ident as Sole>::type_reflection()) + #ecs_path::component::Info::of_sole::<#item_ident>() ) .is_sole(true) .build( |
