diff --git a/examples/settings.rs b/examples/settings.rs index f57db82..5876b30 100644 --- a/examples/settings.rs +++ b/examples/settings.rs @@ -16,11 +16,7 @@ fn main() { } fn setup(mut commands: Commands) { - commands.spawn(( - Camera3d::default(), - AtmosphereCamera::default(), - Spectator, - )); + commands.spawn((Camera3d::default(), AtmosphereCamera::default(), Spectator)); } // Change the resolution when the user presses a number key @@ -30,8 +26,6 @@ fn change_resolution( keys: Res>, ) { if keys.just_pressed(KeyCode::Space) { - #[cfg(feature = "bevy/trace")] - // enabling "bevy/trace" (via "bevy/trace_chrome" or "bevy/trace_tracy") allows you to debug bevy_atmosphere let _change_dithering_executed_span = info_span!("executed", name = "settings::change_dithering").entered(); if let Some(mut settings) = settings { @@ -69,8 +63,6 @@ fn change_resolution( // A separate `change` fn makes it easier to debug in tracy. fn change(mut commands: Commands, settings: Option>, resolution: u32) { - #[cfg(feature = "bevy/trace")] - // enabling "bevy/trace" (via "bevy/trace_chrome" or "bevy/trace_tracy") allows you to debug bevy_atmosphere let _change_resolution_executed_span = info_span!("executed", name = "settings::change_resolution").entered(); if let Some(mut settings) = settings { diff --git a/src/pipeline.rs b/src/pipeline.rs index 33bd6e4..c18eeee 100644 --- a/src/pipeline.rs +++ b/src/pipeline.rs @@ -165,7 +165,6 @@ fn atmosphere_settings_changed( ) { if let Some(settings) = settings { if settings.is_changed() { - #[cfg(feature = "bevy/trace")] let _atmosphere_settings_changed_executed_span = info_span!( "executed", name = "bevy_atmosphere::pipeline::atmosphere_settings_changed" @@ -186,14 +185,12 @@ fn atmosphere_settings_changed( skybox_material.dithering = settings.dithering; } atmosphere_image.array_view = None; // drop the previous texture view - #[cfg(feature = "bevy/trace")] trace!("Resized image to {:?}", size); } } *settings_existed = true; } else { if *settings_existed { - #[cfg(feature = "bevy/trace")] let _atmosphere_settings_changed_executed_span = info_span!( "executed", name = "bevy_atmosphere::pipeline::atmosphere_settings_changed" @@ -212,7 +209,6 @@ fn atmosphere_settings_changed( image.resize(size); let _ = material_assets.get_mut(&material.0); // `get_mut` tells the material to update atmosphere_image.array_view = None; // drop the previous texture view - #[cfg(feature = "bevy/trace")] trace!("Resized image to {:?}", size); } } @@ -330,7 +326,6 @@ fn prepare_atmosphere_resources( let mut update = || update_events.send(AtmosphereUpdateEvent); if atmosphere_image.array_view.is_none() { - #[cfg(feature = "bevy/trace")] let _prepare_atmosphere_assets_executed_span = info_span!( "executed", name = "bevy_atmosphere::pipeline::prepare_atmosphere_assets" @@ -340,21 +335,17 @@ fn prepare_atmosphere_resources( let view = texture.create_view(&ATMOSPHERE_ARRAY_TEXTURE_VIEW_DESCRIPTOR); atmosphere_image.array_view = Some(view); update(); - #[cfg(feature = "bevy/trace")] - { - if let Some(image) = gpu_images.get(&atmosphere_image.handle) { - trace!( - "Created new 2D array texture view from atmosphere texture of size {:?}", - image.size - ); - } else { - trace!( - "Failed to find gpu_image for {:?}", - &atmosphere_image.handle - ); - } + if let Some(image) = gpu_images.get(&atmosphere_image.handle) { + trace!( + "Created new 2D array texture view from atmosphere texture of size {:?}", + image.size + ); + } else { + trace!( + "Failed to find gpu_image for {:?}", + &atmosphere_image.handle + ); } - } if atmosphere.is_changed() { diff --git a/src/plugin.rs b/src/plugin.rs index c15a103..c7c5242 100644 --- a/src/plugin.rs +++ b/src/plugin.rs @@ -105,7 +105,6 @@ fn atmosphere_insert( atmosphere_cameras: Query<(Entity, &Projection, &AtmosphereCamera), Added>, ) { for (camera, projection, atmosphere_camera) in &atmosphere_cameras { - #[cfg(feature = "bevy/trace")] trace!("Adding skybox to camera entity (ID:{:?})", camera); commands .entity(camera) @@ -138,7 +137,6 @@ fn atmosphere_remove( mut atmosphere_cameras: RemovedComponents, ) { for camera in &mut atmosphere_cameras.read() { - #[cfg(feature = "bevy/trace")] trace!("Removing skybox from camera entity (ID:{:?})", camera); let Ok(children) = parents.get(camera) else { error!("Failed to get skybox children entities from camera entity."); @@ -147,7 +145,6 @@ fn atmosphere_remove( for child in children { let Ok(skybox_entity) = atmosphere_skyboxes.get(*child) else { - #[cfg(feature = "bevy/trace")] trace!("Child wasn't found in skybox entities."); continue; };