Skip to content

Commit d2b570e

Browse files
committed
fix: warning should only fire once
1 parent 1384bcb commit d2b570e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

crates/bevy_pbr/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ bevy_derive = { path = "../bevy_derive", version = "0.18.0-dev" }
4242
bevy_diagnostic = { path = "../bevy_diagnostic", version = "0.18.0-dev" }
4343
bevy_ecs = { path = "../bevy_ecs", version = "0.18.0-dev" }
4444
bevy_light = { path = "../bevy_light", version = "0.18.0-dev" }
45+
bevy_log = { path = "../bevy_log", version = "0.18.0-dev" }
4546
bevy_image = { path = "../bevy_image", version = "0.18.0-dev" }
4647
bevy_mesh = { path = "../bevy_mesh", version = "0.18.0-dev", features = [
4748
"morph",

crates/bevy_pbr/src/render/gpu_preprocess.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ use bevy_ecs::{
2626
system::{lifetimeless::Read, Commands, Query, Res, ResMut},
2727
world::{FromWorld, World},
2828
};
29+
use bevy_log::warn_once;
2930
use bevy_render::{
3031
batching::gpu_preprocessing::{
3132
BatchedInstanceBuffers, GpuOcclusionCullingWorkItemBuffers, GpuPreprocessingMode,
@@ -838,7 +839,7 @@ impl Node for LateGpuPreprocessNode {
838839

839840
// Fetch the pipeline.
840841
let Some(preprocess_pipeline_id) = maybe_pipeline_id else {
841-
warn!("The build mesh uniforms pipeline wasn't ready");
842+
warn_once!("The build mesh uniforms pipeline wasn't ready");
842843
return Ok(());
843844
};
844845

0 commit comments

Comments
 (0)