@@ -485,9 +485,9 @@ pub struct SpriteViewBindGroup {
485
485
}
486
486
487
487
#[ derive( Resource , Deref , DerefMut , Default ) ]
488
- pub struct SpriteBatches ( HashMap < ( RetainedViewEntity , MainEntity ) , SpriteBatch > ) ;
488
+ pub struct SpriteBatches ( HashMap < ( RetainedViewEntity , Entity ) , SpriteBatch > ) ;
489
489
490
- #[ derive( PartialEq , Eq , Clone ) ]
490
+ #[ derive( PartialEq , Eq , Clone , Debug ) ]
491
491
pub struct SpriteBatch {
492
492
image_handle_id : AssetId < Image > ,
493
493
range : Range < u32 > ,
@@ -694,7 +694,7 @@ pub fn prepare_sprite_image_bind_groups(
694
694
} ) ;
695
695
696
696
batch_item_index = item_index;
697
- current_batch = Some ( batches. entry ( ( * retained_view, item. main_entity ( ) ) ) . insert (
697
+ current_batch = Some ( batches. entry ( ( * retained_view, item. entity ( ) ) ) . insert (
698
698
SpriteBatch {
699
699
image_handle_id : batch_image_handle,
700
700
range : index..index,
@@ -846,7 +846,7 @@ impl<P: PhaseItem, const I: usize> RenderCommand<P> for SetSpriteTextureBindGrou
846
846
pass : & mut TrackedRenderPass < ' w > ,
847
847
) -> RenderCommandResult {
848
848
let image_bind_groups = image_bind_groups. into_inner ( ) ;
849
- let Some ( batch) = batches. get ( & ( view. retained_view_entity , item. main_entity ( ) ) ) else {
849
+ let Some ( batch) = batches. get ( & ( view. retained_view_entity , item. entity ( ) ) ) else {
850
850
return RenderCommandResult :: Skip ;
851
851
} ;
852
852
@@ -876,7 +876,7 @@ impl<P: PhaseItem> RenderCommand<P> for DrawSpriteBatch {
876
876
pass : & mut TrackedRenderPass < ' w > ,
877
877
) -> RenderCommandResult {
878
878
let sprite_meta = sprite_meta. into_inner ( ) ;
879
- let Some ( batch) = batches. get ( & ( view. retained_view_entity , item. main_entity ( ) ) ) else {
879
+ let Some ( batch) = batches. get ( & ( view. retained_view_entity , item. entity ( ) ) ) else {
880
880
return RenderCommandResult :: Skip ;
881
881
} ;
882
882
0 commit comments