Commit 840c320
Change camera order ambiguity warning to
## Objective
Fixes #22635
Camera order ambiguity warnings currently fire every frame, flooding the
console.
## Solution
- Change `warn!` to `warn_once!` in `sort_cameras` so the warning only
fires once per ambiguity
- Remove the log filter workaround from `ui_target_camera` example since
the warning is no longer spammy
## Testing
Ran the `ui_target_camera` example and triggered a camera order
ambiguity by clicking to give two cameras the same order. Verified the
warning appears exactly once in the logs despite running for many frames
afterward.
---------
Co-authored-by: Alice Cecile <[email protected]>warn_once! (#22649)1 parent 9133047 commit 840c320
File tree
2 files changed
+3
-8
lines changed- crates/bevy_render/src
- examples/ui
2 files changed
+3
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
652 | 653 | | |
653 | 654 | | |
654 | 655 | | |
655 | | - | |
| 656 | + | |
656 | 657 | | |
657 | 658 | | |
658 | 659 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | 7 | | |
10 | 8 | | |
11 | 9 | | |
12 | 10 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 11 | + | |
18 | 12 | | |
19 | 13 | | |
20 | 14 | | |
| |||
0 commit comments