Reflect derived traits on all components and resources: bevy_state (#15228)

Solves https://github.com/bevyengine/bevy/issues/15187 for bevy_state
This commit is contained in:
Blazepaws 2024-09-15 19:16:45 +02:00 committed by GitHub
parent 07e79f3e9f
commit b38cc9e7b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -52,7 +52,7 @@ use bevy_reflect::prelude::ReflectDefault;
#[cfg_attr( #[cfg_attr(
feature = "bevy_reflect", feature = "bevy_reflect",
derive(bevy_reflect::Reflect), derive(bevy_reflect::Reflect),
reflect(Resource) reflect(Resource, Debug, PartialEq)
)] )]
pub struct State<S: States>(pub(crate) S); pub struct State<S: States>(pub(crate) S);
@ -118,7 +118,7 @@ impl<S: States> Deref for State<S> {
#[cfg_attr( #[cfg_attr(
feature = "bevy_reflect", feature = "bevy_reflect",
derive(bevy_reflect::Reflect), derive(bevy_reflect::Reflect),
reflect(Resource, Default) reflect(Resource, Default, Debug)
)] )]
pub enum NextState<S: FreelyMutableState> { pub enum NextState<S: FreelyMutableState> {
/// No state transition is pending /// No state transition is pending