Skip to content

Commit

Permalink
more precise debug message
Browse files Browse the repository at this point in the history
  • Loading branch information
UkoeHB committed Sep 7, 2024
1 parent 93b3786 commit 05da221
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/bevy_state/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ impl CommandsStatesExt for Commands<'_, '_> {
self.add(move |w: &mut World| {
let mut next = w.resource_mut::<NextState<S>>();
if let NextState::Pending(prev) = &*next {
debug!("overwriting state {:?} with {:?}", prev, state);
if *prev != state {
debug!("overwriting next state {:?} with {:?}", prev, state);
}
}
next.set(state);
});
Expand Down

0 comments on commit 05da221

Please sign in to comment.