-
-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Amazing crate, thank you. I'm struggling to figure out: after I spawned a new grid and some children in it, how do you come back to that grid and add more entities to it? Grid is a component and it can be queried for:
fn setup1(
mut commands: Commands,
) {
commands.spawn_big_space_default(|root_grid| {
root_grid.insert(RootGrid);
// add stuff to root_grid ...
}
}
// ...
fn setup2(
mut root_grid: Query<&mut Grid<GP>, With<RootGrid>>,
) {
let mut root_grid = root_grid.single_mut();
// ERROR: `root_grid` is not a `GridCommands`, so `spawn_spatial()` is not found for it
root_grid.spawn_spatial((...));
}
I guess my question applies to any grid, not just the root one. Please help?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request