diff --git a/src/backpack/backpack_ui.rs b/src/backpack/backpack_ui.rs index 80e3b54..2c1bbdc 100644 --- a/src/backpack/backpack_ui.rs +++ b/src/backpack/backpack_ui.rs @@ -57,7 +57,7 @@ pub fn plugin(app: &mut App) { fn setup(mut commands: Commands, assets: Res) { commands .spawn(( - Name::new("backpack"), + Name::new("backpack-ui"), BackpackMarker, Visibility::Hidden, Node { diff --git a/src/cash.rs b/src/cash.rs index 3c968cb..d2f516a 100644 --- a/src/cash.rs +++ b/src/cash.rs @@ -60,6 +60,7 @@ fn update_ui( fn setup(mut commands: Commands, assets: Res) { commands.spawn(( + Name::new("cash-ui"), Text::new("0"), CashText, TextFont { diff --git a/src/heads/heads_ui.rs b/src/heads/heads_ui.rs index 54217a9..402da31 100644 --- a/src/heads/heads_ui.rs +++ b/src/heads/heads_ui.rs @@ -37,13 +37,16 @@ pub fn plugin(app: &mut App) { fn setup(mut commands: Commands, assets: Res) { commands - .spawn(Node { - position_type: PositionType::Absolute, - bottom: Val::Px(20.0), - right: Val::Px(20.0), - height: Val::Px(74.0), - ..default() - }) + .spawn(( + Name::new("heads-ui"), + Node { + position_type: PositionType::Absolute, + bottom: Val::Px(20.0), + right: Val::Px(20.0), + height: Val::Px(74.0), + ..default() + }, + )) .with_children(|parent| { for i in 0..HEAD_SLOTS { spawn_head_ui( diff --git a/src/main.rs b/src/main.rs index 9209e68..569f148 100644 --- a/src/main.rs +++ b/src/main.rs @@ -201,6 +201,7 @@ fn steam_system(steam_client: Res) { fn music(assets: Res, mut commands: Commands) { commands.spawn(( + Name::new("sfx-music"), AudioPlayer::new(assets.music.clone()), PlaybackSettings { mode: PlaybackMode::Loop, @@ -210,6 +211,7 @@ fn music(assets: Res, mut commands: Commands) { )); commands.spawn(( + Name::new("sfx-ambient"), AudioPlayer::new(assets.ambient.clone()), PlaybackSettings { mode: PlaybackMode::Loop, diff --git a/src/sounds.rs b/src/sounds.rs index 734b192..61e31cb 100644 --- a/src/sounds.rs +++ b/src/sounds.rs @@ -68,6 +68,7 @@ fn spawn_sounds( }; commands.spawn(( + Name::new("sfx"), AudioPlayer::new(source), PlaybackSettings { mode: bevy::audio::PlaybackMode::Despawn,