Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to support generics in ActionBuilder derived Component struct. #81

Closed
BartoszF opened this issue Aug 6, 2023 · 1 comment · Fixed by #88
Closed

Ability to support generics in ActionBuilder derived Component struct. #81

BartoszF opened this issue Aug 6, 2023 · 1 comment · Fixed by #88
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@BartoszF
Copy link

BartoszF commented Aug 6, 2023

Hi, I am trying to use generic components to look for targets.

In plain bevy it works fine, but when I try to add it to big-brain, I got an error.

#[derive(Clone, Component, Debug, ActionBuilder)]
pub struct Find<T> (PhantomData<T>);

impl<T> Find<T> {
    fn new() -> Self {
        Find(PhantomData)
    }
}

Error:

37 | pub struct Find<T> (PhantomData<T>);
   |            ^^^^ expected 1 generic argument
   |
note: struct defined here, with 1 generic parameter: `T`
@zkat zkat added bug Something isn't working help wanted Extra attention is needed labels Dec 7, 2023
@zkat
Copy link
Owner

zkat commented Dec 7, 2023

This probably just needs the derive macro to add support for generics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants