Fix render debug overlay panic without bevy_pbr (#25980) - #26012
Open
jorgeandrecastro wants to merge 2 commits into
Open
jorgeandrecastro wants to merge 2 commits into
jorgeandrecastro wants to merge 2 commits into
Conversation
jorgeandrecastro
force-pushed
the
fix/render-debug-overlay-pbr
branch
from
October 2, 2026 16:05
7f968a7 to
68ab83f
Compare
Member
|
could you remove most of the comments to keep to the existing style? And only the first one is useful |
jorgeandrecastro
force-pushed
the
fix/render-debug-overlay-pbr
branch
from
October 3, 2026 12:30
68ab83f to
7062d52
Compare
jorgeandrecastro
force-pushed
the
fix/render-debug-overlay-pbr
branch
from
October 3, 2026 12:31
7062d52 to
9dcbaaa
Compare
Contributor
Author
Done! I cleaned up the extra comments and kept just the first one pointing out that it's optional. Thanks for the guidance! :) |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
Fixes #25980
Solution
I Made the MeshPipelineViewLayouts resource optional in RenderDebugOverlayPlugin by wrapping it in Option<Res> inside crates/bevy_dev_tools/src/render_debug.rs.
An i added safe checks for when it's missing during pipeline initialization and specialization, so non-PBR or pure 2D setups won't panic anymore.
Testing
Did you test these changes? Yes, verified by running the 2d_shapes example with the dev feature enabled.
Are there any parts that need more testing? Nope.
How can other people test your changes? Just run cargo run --example 2d_shapes --features dev and watch it boot up cleanly without throwing a missing resource erro
What platforms did you test on? Tested on Linux (Debian 13, Vulkan with Intel Iris Xe Graphics).
Showcase
The 2d_shapes example now starts up and runs without issues with dev features:
cargo run --example 2d_shapes --features dev
Thanks for reading :)