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

Remove () as a valid bundle #2567

Closed
alice-i-cecile opened this issue Jul 29, 2021 · 2 comments
Closed

Remove () as a valid bundle #2567

alice-i-cecile opened this issue Jul 29, 2021 · 2 comments
Labels
A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use

Comments

@alice-i-cecile
Copy link
Member

From #2522, the 0-element-tuple creates a bundle currently. This is always user error in some form, and should be caught at compile time.

To change this, modify the 0 in this line to a 1:

all_tuples!(tuple_impl, 0, 15, C);

@alice-i-cecile alice-i-cecile added A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use labels Jul 29, 2021
@james7132
Copy link
Member

all_tuples currently has a bug where it errors out when the start is anything other than 0. This was caught and fixed as a part of #2381, but that hasn't been merged yet.

I can split that out if need be.

@alice-i-cecile
Copy link
Member Author

alice-i-cecile commented Aug 1, 2021

Closing this as I found a good use of the empty tuple bundle! When combined with spawn_batch it can be used to quickly make large numbers of empty entities. If nothing else, that's useful for benchmarking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use
Projects
None yet
Development

No branches or pull requests

2 participants