Skip to content

Commit 7112d55

Browse files
Remove all deprecated code (#16338)
# Objective Release cycle things ## Solution Delete items deprecated in 0.15 and migrate bevy itself. ## Testing CI
1 parent 1e03f2a commit 7112d55

File tree

57 files changed

+249
-1488
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+249
-1488
lines changed

crates/bevy_animation/src/lib.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -939,13 +939,6 @@ impl AnimationPlayer {
939939
pub fn animation_mut(&mut self, animation: AnimationNodeIndex) -> Option<&mut ActiveAnimation> {
940940
self.active_animations.get_mut(&animation)
941941
}
942-
943-
#[deprecated = "Use `is_playing_animation` instead"]
944-
/// Returns true if the animation is currently playing or paused, or false
945-
/// if the animation is stopped.
946-
pub fn animation_is_playing(&self, animation: AnimationNodeIndex) -> bool {
947-
self.active_animations.contains_key(&animation)
948-
}
949942
}
950943

951944
/// A system that triggers untargeted animation events for the currently-playing animations.

crates/bevy_asset/src/processor/process.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -105,26 +105,6 @@ impl<
105105
}
106106
}
107107

108-
/// A flexible [`Process`] implementation that loads the source [`Asset`] using the `L` [`AssetLoader`], then
109-
/// saves that `L` asset using the `S` [`AssetSaver`].
110-
///
111-
/// This is a specialized use case of [`LoadTransformAndSave`] and is useful where there is no asset manipulation
112-
/// such as when compressing assets.
113-
///
114-
/// This uses [`LoadAndSaveSettings`] to configure the processor.
115-
///
116-
/// [`Asset`]: crate::Asset
117-
#[deprecated = "Use `LoadTransformAndSave<L, IdentityAssetTransformer<<L as AssetLoader>::Asset>, S>` instead"]
118-
pub type LoadAndSave<L, S> =
119-
LoadTransformAndSave<L, IdentityAssetTransformer<<L as AssetLoader>::Asset>, S>;
120-
121-
/// Settings for the [`LoadAndSave`] [`Process::Settings`] implementation.
122-
///
123-
/// `LoaderSettings` corresponds to [`AssetLoader::Settings`] and `SaverSettings` corresponds to [`AssetSaver::Settings`].
124-
#[deprecated = "Use `LoadTransformAndSaveSettings<LoaderSettings, (), SaverSettings>` instead"]
125-
pub type LoadAndSaveSettings<LoaderSettings, SaverSettings> =
126-
LoadTransformAndSaveSettings<LoaderSettings, (), SaverSettings>;
127-
128108
/// An error that is encountered during [`Process::process`].
129109
#[derive(Error, Debug)]
130110
pub enum ProcessError {

crates/bevy_audio/src/audio.rs

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![expect(deprecated)]
2-
31
use crate::{AudioSource, Decodable, Volume};
42
use bevy_asset::{Asset, Handle};
53
use bevy_ecs::prelude::*;
@@ -207,13 +205,6 @@ impl Default for SpatialScale {
207205
#[reflect(Resource, Default)]
208206
pub struct DefaultSpatialScale(pub SpatialScale);
209207

210-
/// Bundle for playing a standard bevy audio asset
211-
#[deprecated(
212-
since = "0.15.0",
213-
note = "Use the `AudioPlayer` component instead. Inserting it will now also insert a `PlaybackSettings` component automatically."
214-
)]
215-
pub type AudioBundle = AudioSourceBundle<AudioSource>;
216-
217208
/// A component for playing a sound.
218209
///
219210
/// Insert this component onto an entity to trigger an audio source to begin playing.
@@ -252,48 +243,3 @@ impl AudioPlayer<AudioSource> {
252243
Self(source)
253244
}
254245
}
255-
256-
/// Bundle for playing a sound.
257-
///
258-
/// Insert this bundle onto an entity to trigger a sound source to begin playing.
259-
///
260-
/// If the handle refers to an unavailable asset (such as if it has not finished loading yet),
261-
/// the audio will not begin playing immediately. The audio will play when the asset is ready.
262-
///
263-
/// When Bevy begins the audio playback, an [`AudioSink`][crate::AudioSink] component will be
264-
/// added to the entity. You can use that component to control the audio settings during playback.
265-
#[derive(Bundle)]
266-
#[deprecated(
267-
since = "0.15.0",
268-
note = "Use the `AudioPlayer` component instead. Inserting it will now also insert a `PlaybackSettings` component automatically."
269-
)]
270-
pub struct AudioSourceBundle<Source = AudioSource>
271-
where
272-
Source: Asset + Decodable,
273-
{
274-
/// Asset containing the audio data to play.
275-
pub source: AudioPlayer<Source>,
276-
/// Initial settings that the audio starts playing with.
277-
/// If you would like to control the audio while it is playing,
278-
/// query for the [`AudioSink`][crate::AudioSink] component.
279-
/// Changes to this component will *not* be applied to already-playing audio.
280-
pub settings: PlaybackSettings,
281-
}
282-
283-
impl<T: Asset + Decodable> Clone for AudioSourceBundle<T> {
284-
fn clone(&self) -> Self {
285-
Self {
286-
source: self.source.clone(),
287-
settings: self.settings,
288-
}
289-
}
290-
}
291-
292-
impl<T: Decodable + Asset> Default for AudioSourceBundle<T> {
293-
fn default() -> Self {
294-
Self {
295-
source: AudioPlayer(Handle::default()),
296-
settings: Default::default(),
297-
}
298-
}
299-
}

crates/bevy_audio/src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,11 @@ mod volume;
3939
/// The audio prelude.
4040
///
4141
/// This includes the most common types in this crate, re-exported for your convenience.
42-
#[expect(deprecated)]
4342
pub mod prelude {
4443
#[doc(hidden)]
4544
pub use crate::{
46-
AudioBundle, AudioPlayer, AudioSink, AudioSinkPlayback, AudioSource, AudioSourceBundle,
47-
Decodable, GlobalVolume, Pitch, PitchBundle, PlaybackSettings, SpatialAudioSink,
48-
SpatialListener,
45+
AudioPlayer, AudioSink, AudioSinkPlayback, AudioSource, Decodable, GlobalVolume, Pitch,
46+
PlaybackSettings, SpatialAudioSink, SpatialListener,
4947
};
5048
}
5149

crates/bevy_audio/src/pitch.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
#![expect(deprecated)]
2-
3-
use crate::{AudioSourceBundle, Decodable};
1+
use crate::Decodable;
42
use bevy_asset::Asset;
53
use bevy_reflect::TypePath;
64
use rodio::{
@@ -35,10 +33,3 @@ impl Decodable for Pitch {
3533
SineWave::new(self.frequency).take_duration(self.duration)
3634
}
3735
}
38-
39-
/// Bundle for playing a bevy note sound
40-
#[deprecated(
41-
since = "0.15.0",
42-
note = "Use the `AudioPlayer<Pitch>` component instead. Inserting it will now also insert a `PlaybackSettings` component automatically."
43-
)]
44-
pub type PitchBundle = AudioSourceBundle<Pitch>;

crates/bevy_color/src/color.rs

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,6 @@ impl Color {
8484
(*self).into()
8585
}
8686

87-
#[deprecated = "Use `Color::srgba` instead"]
88-
/// Creates a new [`Color`] object storing a [`Srgba`] color.
89-
pub const fn rgba(red: f32, green: f32, blue: f32, alpha: f32) -> Self {
90-
Self::srgba(red, green, blue, alpha)
91-
}
92-
9387
/// Creates a new [`Color`] object storing a [`Srgba`] color.
9488
pub const fn srgba(red: f32, green: f32, blue: f32, alpha: f32) -> Self {
9589
Self::Srgba(Srgba {
@@ -100,12 +94,6 @@ impl Color {
10094
})
10195
}
10296

103-
#[deprecated = "Use `Color::srgb` instead"]
104-
/// Creates a new [`Color`] object storing a [`Srgba`] color with an alpha of 1.0.
105-
pub const fn rgb(red: f32, green: f32, blue: f32) -> Self {
106-
Self::srgb(red, green, blue)
107-
}
108-
10997
/// Creates a new [`Color`] object storing a [`Srgba`] color with an alpha of 1.0.
11098
pub const fn srgb(red: f32, green: f32, blue: f32) -> Self {
11199
Self::Srgba(Srgba {
@@ -116,12 +104,6 @@ impl Color {
116104
})
117105
}
118106

119-
#[deprecated = "Use `Color::srgb_from_array` instead"]
120-
/// Reads an array of floats to creates a new [`Color`] object storing a [`Srgba`] color with an alpha of 1.0.
121-
pub fn rgb_from_array([r, g, b]: [f32; 3]) -> Self {
122-
Self::Srgba(Srgba::rgb(r, g, b))
123-
}
124-
125107
/// Reads an array of floats to creates a new [`Color`] object storing a [`Srgba`] color with an alpha of 1.0.
126108
pub const fn srgb_from_array(array: [f32; 3]) -> Self {
127109
Self::Srgba(Srgba {
@@ -132,14 +114,6 @@ impl Color {
132114
})
133115
}
134116

135-
#[deprecated = "Use `Color::srgba_u8` instead"]
136-
/// Creates a new [`Color`] object storing a [`Srgba`] color from [`u8`] values.
137-
///
138-
/// A value of 0 is interpreted as 0.0, and a value of 255 is interpreted as 1.0.
139-
pub fn rgba_u8(red: u8, green: u8, blue: u8, alpha: u8) -> Self {
140-
Self::srgba_u8(red, green, blue, alpha)
141-
}
142-
143117
/// Creates a new [`Color`] object storing a [`Srgba`] color from [`u8`] values.
144118
///
145119
/// A value of 0 is interpreted as 0.0, and a value of 255 is interpreted as 1.0.
@@ -152,14 +126,6 @@ impl Color {
152126
})
153127
}
154128

155-
#[deprecated = "Use `Color::srgb_u8` instead"]
156-
/// Creates a new [`Color`] object storing a [`Srgba`] color from [`u8`] values with an alpha of 1.0.
157-
///
158-
/// A value of 0 is interpreted as 0.0, and a value of 255 is interpreted as 1.0.
159-
pub fn rgb_u8(red: u8, green: u8, blue: u8) -> Self {
160-
Self::srgb_u8(red, green, blue)
161-
}
162-
163129
/// Creates a new [`Color`] object storing a [`Srgba`] color from [`u8`] values with an alpha of 1.0.
164130
///
165131
/// A value of 0 is interpreted as 0.0, and a value of 255 is interpreted as 1.0.
@@ -172,12 +138,6 @@ impl Color {
172138
})
173139
}
174140

175-
#[deprecated = "Use Color::linear_rgba instead."]
176-
/// Creates a new [`Color`] object storing a [`LinearRgba`] color.
177-
pub const fn rbga_linear(red: f32, green: f32, blue: f32, alpha: f32) -> Self {
178-
Self::linear_rgba(red, green, blue, alpha)
179-
}
180-
181141
/// Creates a new [`Color`] object storing a [`LinearRgba`] color.
182142
pub const fn linear_rgba(red: f32, green: f32, blue: f32, alpha: f32) -> Self {
183143
Self::LinearRgba(LinearRgba {
@@ -188,12 +148,6 @@ impl Color {
188148
})
189149
}
190150

191-
#[deprecated = "Use Color::linear_rgb instead."]
192-
/// Creates a new [`Color`] object storing a [`LinearRgba`] color with an alpha of 1.0.
193-
pub const fn rgb_linear(red: f32, green: f32, blue: f32) -> Self {
194-
Self::linear_rgb(red, green, blue)
195-
}
196-
197151
/// Creates a new [`Color`] object storing a [`LinearRgba`] color with an alpha of 1.0.
198152
pub const fn linear_rgb(red: f32, green: f32, blue: f32) -> Self {
199153
Self::LinearRgba(LinearRgba {

crates/bevy_core_pipeline/src/auto_exposure/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ use node::AutoExposureNode;
2424
use pipeline::{
2525
AutoExposurePass, AutoExposurePipeline, ViewAutoExposurePipeline, METERING_SHADER_HANDLE,
2626
};
27-
#[allow(deprecated)]
28-
pub use settings::{AutoExposure, AutoExposureSettings};
27+
pub use settings::AutoExposure;
2928

3029
use crate::{
3130
auto_exposure::compensation_curve::GpuAutoExposureCompensationCurve,

crates/bevy_core_pipeline/src/auto_exposure/settings.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,6 @@ pub struct AutoExposure {
8888
pub compensation_curve: Handle<AutoExposureCompensationCurve>,
8989
}
9090

91-
#[deprecated(since = "0.15.0", note = "Renamed to `AutoExposure`")]
92-
pub type AutoExposureSettings = AutoExposure;
93-
9491
impl Default for AutoExposure {
9592
fn default() -> Self {
9693
Self {

crates/bevy_core_pipeline/src/bloom/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@ mod settings;
33
mod upsampling_pipeline;
44

55
use bevy_color::{Gray, LinearRgba};
6-
#[allow(deprecated)]
7-
pub use settings::{
8-
Bloom, BloomCompositeMode, BloomPrefilter, BloomPrefilterSettings, BloomSettings,
9-
};
6+
pub use settings::{Bloom, BloomCompositeMode, BloomPrefilter};
107

118
use crate::{
129
core_2d::graph::{Core2d, Node2d},

crates/bevy_core_pipeline/src/bloom/settings.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,6 @@ pub struct Bloom {
118118
pub uv_offset: f32,
119119
}
120120

121-
#[deprecated(since = "0.15.0", note = "Renamed to `Bloom`")]
122-
pub type BloomSettings = Bloom;
123-
124121
impl Bloom {
125122
const DEFAULT_MAX_MIP_DIMENSION: u32 = 512;
126123
const DEFAULT_UV_OFFSET: f32 = 0.004;
@@ -203,9 +200,6 @@ pub struct BloomPrefilter {
203200
pub threshold_softness: f32,
204201
}
205202

206-
#[deprecated(since = "0.15.0", note = "Renamed to `BloomPrefilter`")]
207-
pub type BloomPrefilterSettings = BloomPrefilter;
208-
209203
#[derive(Debug, Clone, Reflect, PartialEq, Eq, Hash, Copy)]
210204
pub enum BloomCompositeMode {
211205
EnergyConserving,

0 commit comments

Comments
 (0)