Skip to content
1 change: 1 addition & 0 deletions crates/bevy_render/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ bevy_window = { path = "../bevy_window", version = "0.19.0-dev" }
bevy_utils = { path = "../bevy_utils", version = "0.19.0-dev" }
bevy_tasks = { path = "../bevy_tasks", version = "0.19.0-dev" }
bevy_image = { path = "../bevy_image", version = "0.19.0-dev" }
bevy_log = { path = "../bevy_log", version = "0.19.0-dev" }
bevy_mesh = { path = "../bevy_mesh", version = "0.19.0-dev" }
bevy_camera = { path = "../bevy_camera", version = "0.19.0-dev" }
bevy_shader = { path = "../bevy_shader", version = "0.19.0-dev" }
Expand Down
3 changes: 2 additions & 1 deletion crates/bevy_render/src/camera.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ use bevy_platform::collections::{HashMap, HashSet};
use bevy_reflect::prelude::*;
use bevy_transform::components::GlobalTransform;
use bevy_window::{PrimaryWindow, Window, WindowCreated, WindowResized, WindowScaleFactorChanged};
use bevy_log::warn_once;
use tracing::warn;
use wgpu::TextureFormat;

Expand Down Expand Up @@ -652,7 +653,7 @@ pub fn sort_cameras(
}

if !ambiguities.is_empty() {
warn!(
warn_once!(
"Camera order ambiguities detected for active cameras with the following priorities: {:?}. \
To fix this, ensure there is exactly one Camera entity spawned with a given order for a given RenderTarget. \
Ambiguities should be resolved because either (1) multiple active cameras were spawned accidentally, which will \
Expand Down
8 changes: 1 addition & 7 deletions examples/ui/ui_target_camera.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,11 @@ use bevy::color::palettes::css::BLUE;
use bevy::color::palettes::css::GREEN;
use bevy::color::palettes::css::RED;
use bevy::color::palettes::css::YELLOW;
use bevy::log::LogPlugin;
use bevy::log::DEFAULT_FILTER;
use bevy::prelude::*;

fn main() {
App::new()
.add_plugins(DefaultPlugins.set(LogPlugin {
// Disable camera order ambiguity warnings
filter: format!("{DEFAULT_FILTER},bevy_render::camera=off"),
..Default::default()
}))
.add_plugins(DefaultPlugins)
.add_systems(Startup, setup)
.run();
}
Expand Down
Loading