pub fn insert_batch<I, B>(
batch: I,
insert_mode: InsertMode,
) -> impl Command<Result<(), BevyError>>where
I: IntoIterator<Item = (Entity, B)> + Send + Sync + 'static,
B: Bundle,
<B as DynamicBundle>::Effect: NoBundleEffect,Expand description
A Command that consumes an iterator to add a series of Bundles to a set of entities.
If any entities do not exist in the world, this command will return a
TryInsertBatchError.
This is more efficient than inserting the bundles individually.