From 14a7689e1acc65aa5aa80df5961240651ff59aad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=9E=97=E4=BC=9F?= Date: Mon, 13 Feb 2023 18:20:31 +0000 Subject: [PATCH] Derive Debug for State and NextState (#7651) # Objective - Derive Debug for State and NextState --- crates/bevy_ecs/src/schedule/state.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bevy_ecs/src/schedule/state.rs b/crates/bevy_ecs/src/schedule/state.rs index 6e566ad6b3..4bc3ea9b09 100644 --- a/crates/bevy_ecs/src/schedule/state.rs +++ b/crates/bevy_ecs/src/schedule/state.rs @@ -68,7 +68,7 @@ pub struct OnUpdate(pub S); /// [`apply_state_transition::`] system. /// /// The starting state is defined via the [`Default`] implementation for `S`. -#[derive(Resource, Default)] +#[derive(Resource, Default, Debug)] pub struct State(pub S); /// The next state of [`State`]. @@ -76,7 +76,7 @@ pub struct State(pub S); /// To queue a transition, just set the contained value to `Some(next_state)`. /// Note that these transitions can be overriden by other systems: /// only the actual value of this resource at the time of [`apply_state_transition`] matters. -#[derive(Resource, Default)] +#[derive(Resource, Default, Debug)] pub struct NextState(pub Option); impl NextState {