summaryrefslogtreecommitdiff
path: root/engine-ecs-macros/src
diff options
context:
space:
mode:
Diffstat (limited to 'engine-ecs-macros/src')
-rw-r--r--engine-ecs-macros/src/lib.rs21
1 files changed, 15 insertions, 6 deletions
diff --git a/engine-ecs-macros/src/lib.rs b/engine-ecs-macros/src/lib.rs
index 4ae83ce..a061165 100644
--- a/engine-ecs-macros/src/lib.rs
+++ b/engine-ecs-macros/src/lib.rs
@@ -135,9 +135,14 @@ pub fn component_derive(input: TokenStream) -> TokenStream
fn into_parts(self) -> #ecs_path::component::Parts
{
#ecs_path::component::Parts::builder()
- .name(<Self as Component>::name())
- .type_name(std::any::type_name::<Self>())
- .type_reflection(<Self as Component>::type_reflection())
+ .component_info(
+ #ecs_path::component::Info::default()
+ .with_name(<Self as Component>::name())
+ .with_type_name(std::any::type_name::<Self>())
+ .with_type_reflection(
+ <Self as Component>::type_reflection()
+ )
+ )
.build(
<Self as #ecs_path::component::WithAssociatedId>::id(),
self
@@ -257,10 +262,14 @@ pub fn sole_derive(input: TokenStream) -> TokenStream
fn into_parts(self) -> #ecs_path::component::Parts
{
#ecs_path::component::Parts::builder()
- .name(<Self as Sole>::name())
- .type_name(std::any::type_name::<Self>())
+ .component_info(
+ #ecs_path::component::Info::default()
+ .with_name(<Self as Sole>::name())
+ .with_type_name(std::any::type_name::<Self>())
+ .with_is_sole(true)
+ .with_type_reflection(<Self as Sole>::type_reflection())
+ )
.is_sole(true)
- .type_reflection(<Self as Sole>::type_reflection())
.build(
<Self as #ecs_path::component::WithAssociatedId>::id(),
self