Skip to content

Conversation

@kfc35
Copy link
Contributor

@kfc35 kfc35 commented Dec 7, 2025

Objective

Solution

  • Adds a new scene in the ui testbed that tests the generation of the Ui Debug Overlay. It only is viewable if you run the example with --features bevy_ui_debug.
  • Added a way to override the color used by the overlay to ensure that screenshots are consistent between CI runs (the line colors are generated based on the Entity, which changes every time you change the scene.)
  • Added the --features bevy_ui_debug flag to example-run.yml, ensuring that screenshots and their validations take this new scene into account. (I assumed I’m not supposed to add this to validation-jobs.yml under run-examples-on-wasm, but if I’m supposed to, let me know and I can add it. I figured a debug feature does not need that specific validation).

Testing

  • I ran the command cargo run --example testbed_ui --features bevy_ui_debug and verified that debug lines showed up for regular outlines, for a node with Visibility::Hidden with show_hidden = true, and that clipped areas have outlines with show_clipped = true. I carouseled through all the scenes a couple of times
  • I also ran cargo run --example testbed_ui and made sure nothing was ruined after multiple carousels through all the scenes.

Showcase

cargo run --example testbed_ui --features bevy_ui_debug , press spacebar 11x to see the scene.

Screenshot 2025-12-06 at 10 03 25 PM

Copy link
Contributor

@blamelessgames blamelessgames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a debug outlines scene to the testbed_ui example

3 participants