bevy
bevy copied to clipboard
Remove the 16-field limitation on the systemparam derive
Objective
Since this derive macro can create arbitrary code, it shouldn't be limited by the built-in limit to 16 system-parameters a tuple can have.
Solution
- Adjust the derive macro to use a separate type, and expose the system param tuple macro so the derive macro can call it as needed.
Changelog
The SystemParam derive now supports structs with over 16 fields.
Have you checked the compile time perf effects? This generates more code and as such will likely compile slower. If this is indeed the case, maybe only use the new code for >16 fields and use the old tuple code for <=16 fields?
Closing in favor of #6867