Skip to content

Commit 2baa5c7

Browse files
core pipeline
1 parent 15c9af5 commit 2baa5c7

File tree

1 file changed

+5
-2
lines changed
  • crates/bevy_core_pipeline/src/oit

1 file changed

+5
-2
lines changed

crates/bevy_core_pipeline/src/oit/mod.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,13 @@ impl Component for OrderIndependentTransparencySettings {
7171
type Mutability = Mutable;
7272

7373
fn register_component_hooks(hooks: &mut ComponentHooks) {
74-
hooks.on_add(|world, entity, _| {
74+
hooks.on_add(|world, entity, _, caller| {
7575
if let Some(value) = world.get::<OrderIndependentTransparencySettings>(entity) {
7676
if value.layer_count > 32 {
77-
warn!("OrderIndependentTransparencySettings layer_count set to {} might be too high.", value.layer_count);
77+
warn!("{}OrderIndependentTransparencySettings layer_count set to {} might be too high.",
78+
caller.map(|location|format!("{location}: ")).unwrap_or_default(),
79+
value.layer_count
80+
);
7881
}
7982
}
8083
});

0 commit comments

Comments
 (0)