diff --git a/crates/bevy_sprite/src/render/mod.rs b/crates/bevy_sprite/src/render/mod.rs index 2c08a747feb87..b9d57cb35a51b 100644 --- a/crates/bevy_sprite/src/render/mod.rs +++ b/crates/bevy_sprite/src/render/mod.rs @@ -344,9 +344,6 @@ pub struct ExtractedSprite { pub flip_x: bool, pub flip_y: bool, pub anchor: Vec2, - /// For cases where additional [`ExtractedSprites`] are created during extraction, this stores the - /// entity that caused that creation for use in determining visibility. - pub original_entity: Option, pub render_entity: Entity, pub slice_indices: Range, } @@ -416,7 +413,6 @@ pub fn extract_sprites( flip_y: sprite.flip_y, image_handle_id: sprite.image.id(), anchor: sprite.anchor.as_vec(), - original_entity: Some(original_entity), render_entity, slice_indices: start..end, }, @@ -451,7 +447,6 @@ pub fn extract_sprites( flip_y: sprite.flip_y, image_handle_id: sprite.image.id(), anchor: sprite.anchor.as_vec(), - original_entity: Some(original_entity), render_entity, slice_indices: 0..0, }, @@ -581,10 +576,7 @@ pub fn queue_sprites( .reserve(extracted_sprites.sprites.len()); for (main_entity, extracted_sprite) in extracted_sprites.sprites.iter() { - let index = extracted_sprite - .original_entity - .unwrap_or(extracted_sprite.render_entity) - .index(); + let index = main_entity.index(); if !view_entities.contains(index as usize) { continue; diff --git a/crates/bevy_text/src/text2d.rs b/crates/bevy_text/src/text2d.rs index 416cde584baa3..440e74201633d 100644 --- a/crates/bevy_text/src/text2d.rs +++ b/crates/bevy_text/src/text2d.rs @@ -242,7 +242,6 @@ pub fn extract_text2d_sprite( flip_x: false, flip_y: false, anchor: Anchor::Center.as_vec(), - original_entity: Some(original_entity), render_entity: commands.spawn(TemporaryRenderEntity).id(), slice_indices: start..end, },