![]() # Objective The UI debug overlay draws an outline for every UI node even if it is invisible or clipped. Disable debug outlines for hidden and clipped nodes by default and add options to renable them if needed. ## Solution * Add `show_hidden` and `show_clipped` fields to `UiDebugOptions`: ```rust /// Show outlines for non-visible UI nodes pub show_hidden: bool, /// Show outlines for clipped sections of UI nodes pub show_clipped: bool, ``` * Only extract debug outlines for hidden and clipped UI nodes if the respective field in `UiDebugOptions` is set to `true`. ## Testing Also added some extra features to the `testbed_ui` example that demonstrate the new options: cargo run --example testbed_ui --features "bevy_ui_debug" <img width="641" alt="show-hidden-and-clipped" src="https://github.com/user-attachments/assets/16a68600-170c-469e-a3c7-f7dae411dc40" /> |
||
---|---|---|
.. | ||
2d.rs | ||
3d.rs | ||
ui_layout_rounding.rs | ||
ui.rs |