mirror of
https://github.com/bevyengine/bevy
synced 2024-11-13 00:17:27 +00:00
Reflect derived traits on all components and resources: bevy_audio (#15211)
Solves https://github.com/bevyengine/bevy/issues/15187 for bevy_audio
This commit is contained in:
parent
53d2bc9482
commit
abac8c7b0f
1 changed files with 4 additions and 4 deletions
|
@ -48,7 +48,7 @@ pub enum PlaybackMode {
|
||||||
/// [`AudioSink`][crate::AudioSink] or [`SpatialAudioSink`][crate::SpatialAudioSink]
|
/// [`AudioSink`][crate::AudioSink] or [`SpatialAudioSink`][crate::SpatialAudioSink]
|
||||||
/// components. Changes to this component will *not* be applied to already-playing audio.
|
/// components. Changes to this component will *not* be applied to already-playing audio.
|
||||||
#[derive(Component, Clone, Copy, Debug, Reflect)]
|
#[derive(Component, Clone, Copy, Debug, Reflect)]
|
||||||
#[reflect(Default, Component)]
|
#[reflect(Default, Component, Debug)]
|
||||||
pub struct PlaybackSettings {
|
pub struct PlaybackSettings {
|
||||||
/// The desired playback behavior.
|
/// The desired playback behavior.
|
||||||
pub mode: PlaybackMode,
|
pub mode: PlaybackMode,
|
||||||
|
@ -144,7 +144,7 @@ impl PlaybackSettings {
|
||||||
/// This must be accompanied by `Transform` and `GlobalTransform`.
|
/// This must be accompanied by `Transform` and `GlobalTransform`.
|
||||||
/// Only one entity with a `SpatialListener` should be present at any given time.
|
/// Only one entity with a `SpatialListener` should be present at any given time.
|
||||||
#[derive(Component, Clone, Debug, Reflect)]
|
#[derive(Component, Clone, Debug, Reflect)]
|
||||||
#[reflect(Default, Component)]
|
#[reflect(Default, Component, Debug)]
|
||||||
pub struct SpatialListener {
|
pub struct SpatialListener {
|
||||||
/// Left ear position relative to the `GlobalTransform`.
|
/// Left ear position relative to the `GlobalTransform`.
|
||||||
pub left_ear_offset: Vec3,
|
pub left_ear_offset: Vec3,
|
||||||
|
@ -175,7 +175,7 @@ impl SpatialListener {
|
||||||
///
|
///
|
||||||
/// Note: changing this value will not affect already playing audio.
|
/// Note: changing this value will not affect already playing audio.
|
||||||
#[derive(Resource, Default, Clone, Copy, Reflect)]
|
#[derive(Resource, Default, Clone, Copy, Reflect)]
|
||||||
#[reflect(Resource)]
|
#[reflect(Resource, Default)]
|
||||||
pub struct GlobalVolume {
|
pub struct GlobalVolume {
|
||||||
/// The global volume of all audio.
|
/// The global volume of all audio.
|
||||||
pub volume: Volume,
|
pub volume: Volume,
|
||||||
|
@ -223,7 +223,7 @@ impl Default for SpatialScale {
|
||||||
///
|
///
|
||||||
/// Default is `Vec3::ONE`.
|
/// Default is `Vec3::ONE`.
|
||||||
#[derive(Resource, Default, Clone, Copy, Reflect)]
|
#[derive(Resource, Default, Clone, Copy, Reflect)]
|
||||||
#[reflect(Resource)]
|
#[reflect(Resource, Default)]
|
||||||
pub struct DefaultSpatialScale(pub SpatialScale);
|
pub struct DefaultSpatialScale(pub SpatialScale);
|
||||||
|
|
||||||
/// Bundle for playing a standard bevy audio asset
|
/// Bundle for playing a standard bevy audio asset
|
||||||
|
|
Loading…
Reference in a new issue