UI and unloaded assets: don't filter out nodes with an unloaded image (#11205)

# Objective

- after #10520, UI can't display images or text with a background color

## Solution

- don't filter out UI nodes with an unloaded image
This commit is contained in:
François 2024-01-24 23:15:43 +01:00 committed by GitHub
parent bcbab18f37
commit 95b92307b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -399,7 +399,6 @@ pub fn extract_uinode_outlines(
pub fn extract_uinodes(
mut extracted_uinodes: ResMut<ExtractedUiNodes>,
images: Extract<Res<Assets<Image>>>,
texture_atlases: Extract<Res<Assets<TextureAtlasLayout>>>,
default_ui_camera: Extract<DefaultUiCamera>,
uinode_query: Extract<
@ -429,10 +428,6 @@ pub fn extract_uinodes(
}
let (image, flip_x, flip_y) = if let Some(image) = maybe_image {
// Skip loading images
if !images.contains(&image.texture) {
continue;
}
(image.texture.id(), image.flip_x, image.flip_y)
} else {
(AssetId::default(), false, false)