|
|
|
@ -99,6 +99,7 @@ fn add_shape(
|
|
|
|
mut commands: Commands,
|
|
|
|
mut commands: Commands,
|
|
|
|
shapes: Res<Assets<ShapeAsset>>,
|
|
|
|
shapes: Res<Assets<ShapeAsset>>,
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
|
|
|
|
info!("Spawning asset component {:?}", event.event());
|
|
|
|
let asset_component = query.get(event.entity).unwrap();
|
|
|
|
let asset_component = query.get(event.entity).unwrap();
|
|
|
|
let shape = shapes.get(asset_component.handle.id()).unwrap();
|
|
|
|
let shape = shapes.get(asset_component.handle.id()).unwrap();
|
|
|
|
commands.entity(event.entity).insert(shape.into_bundle());
|
|
|
|
commands.entity(event.entity).insert(shape.into_bundle());
|
|
|
|
|