#I have an Vec<Entity>, how canI get the mutable references for all these entities from a Query?
6 messages · Page 1 of 1 (latest)
Look at the example here: https://docs.rs/bevy/latest/bevy/ecs/prelude/struct.Query.html#method.iter_many_mut
System parameter that provides selective access to the [Component] data stored in a [World].
this actually doesn't work for me because i need a vec of all the mutable references, but I found get_unchecked
get_unchecked is possibly unsafe, so maybe it would be a better idea to change how your code works? Plus entities are just pieces of value data (like numbers), so why referencing them is needed?
Maybe you can share a bit of your code?