Skip to content

Commit

Permalink
fix spine entities breaking when chidlren are attached
Browse files Browse the repository at this point in the history
  • Loading branch information
jabuwu committed Oct 28, 2022
1 parent 3e41323 commit 83efea5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub use crate::{
assets::*,
crossfades::Crossfades,
entity_sync::*,
rusty_spine::{SkeletonController, Color},
rusty_spine::{Color, SkeletonController},
textures::{SpineTextureCreateEvent, SpineTextureDisposeEvent},
};

Expand Down Expand Up @@ -504,7 +504,8 @@ fn spine_render(
) {
for (mut spine, spine_children) in spine_query.iter_mut() {
let mut renderables = spine.0.combined_renderables();
for (renderable_index, child) in spine_children.iter().enumerate() {
let mut renderable_index = 0;
for child in spine_children.iter() {
if let Ok((
mesh_entity,
mesh_handle,
Expand Down Expand Up @@ -631,6 +632,7 @@ fn spine_render(
} else {
empty_mesh(mesh);
}
renderable_index += 1;
}
}
}
Expand Down

0 comments on commit 83efea5

Please sign in to comment.