From abac8c7b0ffe5da4a940e8a38f58de586e793385 Mon Sep 17 00:00:00 2001 From: Blazepaws <157802762+blazepaws@users.noreply.github.com> Date: Sun, 15 Sep 2024 16:24:00 +0200 Subject: [PATCH] Reflect derived traits on all components and resources: bevy_audio (#15211) Solves https://github.com/bevyengine/bevy/issues/15187 for bevy_audio --- crates/bevy_audio/src/audio.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/bevy_audio/src/audio.rs b/crates/bevy_audio/src/audio.rs index 497adfcdba..ec50201a16 100644 --- a/crates/bevy_audio/src/audio.rs +++ b/crates/bevy_audio/src/audio.rs @@ -48,7 +48,7 @@ pub enum PlaybackMode { /// [`AudioSink`][crate::AudioSink] or [`SpatialAudioSink`][crate::SpatialAudioSink] /// components. Changes to this component will *not* be applied to already-playing audio. #[derive(Component, Clone, Copy, Debug, Reflect)] -#[reflect(Default, Component)] +#[reflect(Default, Component, Debug)] pub struct PlaybackSettings { /// The desired playback behavior. pub mode: PlaybackMode, @@ -144,7 +144,7 @@ impl PlaybackSettings { /// This must be accompanied by `Transform` and `GlobalTransform`. /// Only one entity with a `SpatialListener` should be present at any given time. #[derive(Component, Clone, Debug, Reflect)] -#[reflect(Default, Component)] +#[reflect(Default, Component, Debug)] pub struct SpatialListener { /// Left ear position relative to the `GlobalTransform`. pub left_ear_offset: Vec3, @@ -175,7 +175,7 @@ impl SpatialListener { /// /// Note: changing this value will not affect already playing audio. #[derive(Resource, Default, Clone, Copy, Reflect)] -#[reflect(Resource)] +#[reflect(Resource, Default)] pub struct GlobalVolume { /// The global volume of all audio. pub volume: Volume, @@ -223,7 +223,7 @@ impl Default for SpatialScale { /// /// Default is `Vec3::ONE`. #[derive(Resource, Default, Clone, Copy, Reflect)] -#[reflect(Resource)] +#[reflect(Resource, Default)] pub struct DefaultSpatialScale(pub SpatialScale); /// Bundle for playing a standard bevy audio asset