Replies: 2 comments 2 replies
-
|
You can wrap each group in tuples which can let you extend the limit to pretty much anything you need. Each tuple has a limit of 16 items but it can also have nested tuples For example, here's what your code could look like: fn handle_input(
mut commands: Commands,
mut messages: MessageReader<BlockOperation>,
mut block_changes: ResMut<BlockChanges>,
mut large_objects: Query<&mut ChunksMap>,
mut chunks: Query<&mut ChunkTypes>,
mut small_objects: Query<(
&mut SmallBlocksSize,
&mut SmallBlocksTypes,
&mut CornerOffset,
)>,
transforms: Query<&Transform>,
body_handles: Query<&RigidBodyComponent>,
special_block_entities: Query<&SpecialBlockEntities>,
block_properties: Res<BlockProperties>,
(mut bodies, mut colliders, mut islands): (
ResMut<RigibBodies>,
ResMut<ColliderSetRes>,
ResMut<IslandManagerRes>
),
mut impulse_joints: ResMut<ImpulseJointSetRes>,
mut multibody_joints: ResMut<MultibodyJointSetRes>,
broad_phase: Res<BroadPhaseRes>,
narrow_phase: Res<NarrowPhaseRes>,
) |
Beta Was this translation helpful? Give feedback.
-
|
While it is possible to use tuples to get effectively infinite parameters (as per IceSentry's answer), if you're using that many parameters, it may be worth considering if you should split the system into several smaller systems. For example, your example is called |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
My system that went wrong:
Maybe the limit of 16 is not enough ? But system parameters can be grouped. For example I can group the last few resources into one big physics system parameter structure.
Beta Was this translation helpful? Give feedback.
All reactions