UI extraction order fix (#9099)

# Objective

Fixes #9097

## Solution

Reorder the `ExtractSchedule` so that the `extract_text_uinodes` and
`extract_uinode_borders` systems are run after `extract_atlas_uinodes`.

## Changelog

`bevy_ui::render`:
* Added the `ExtractAtlasNode` variant to `RenderUiSystem`.
* Changed `ExtractSchedule` so that `extract_uinode_borders` and
`extract_text_uinodes` run after `extract_atlas_uinodes`.
This commit is contained in:
ickshonpe 2023-07-23 14:06:36 +01:00 committed by GitHub
parent 70a7eb0b10
commit a879f98d3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,6 +59,7 @@ pub const UI_SHADER_HANDLE: HandleUntyped =
#[derive(Debug, Hash, PartialEq, Eq, Clone, SystemSet)] #[derive(Debug, Hash, PartialEq, Eq, Clone, SystemSet)]
pub enum RenderUiSystem { pub enum RenderUiSystem {
ExtractNode, ExtractNode,
ExtractAtlasNode,
} }
pub fn build_ui_render(app: &mut App) { pub fn build_ui_render(app: &mut App) {
@ -82,10 +83,12 @@ pub fn build_ui_render(app: &mut App) {
extract_default_ui_camera_view::<Camera2d>, extract_default_ui_camera_view::<Camera2d>,
extract_default_ui_camera_view::<Camera3d>, extract_default_ui_camera_view::<Camera3d>,
extract_uinodes.in_set(RenderUiSystem::ExtractNode), extract_uinodes.in_set(RenderUiSystem::ExtractNode),
extract_atlas_uinodes.after(RenderUiSystem::ExtractNode), extract_atlas_uinodes
extract_uinode_borders.after(RenderUiSystem::ExtractNode), .in_set(RenderUiSystem::ExtractAtlasNode)
.after(RenderUiSystem::ExtractNode),
extract_uinode_borders.after(RenderUiSystem::ExtractAtlasNode),
#[cfg(feature = "bevy_text")] #[cfg(feature = "bevy_text")]
extract_text_uinodes.after(RenderUiSystem::ExtractNode), extract_text_uinodes.after(RenderUiSystem::ExtractAtlasNode),
), ),
) )
.add_systems( .add_systems(