#'&World conflicts with a previous mutable system parameter. Allowing this would break Rust's
1 messages · Page 1 of 1 (latest)
The problem is that stuff like ResMut, &mut MyComponent, etc. require mutable access to the world. So it would be unsound and break Rust’s borrow rules to have both a mutable access and immutable one to the world
There are a few possible solutions I can think of:
- Try and turn the
&Worldparam into exactly the params you need - Use
ParamSetto safely access&World(https://docs.rs/bevy/latest/bevy/ecs/prelude/struct.ParamSet.html) - Make this system exclusive with
&mut World
A collection of potentially conflicting SystemParams allowed by disjoint access.
And once you have &mut World, resource_scope can be really handy