I just found that invalidating entities is still an issue, but luckily I also discovered the fix we need in the bevy_hierarchy crate. Just posting here for a heads-up in case anybody runs into it:
I'm re-opening this issue because the fix I opened in Bevy wasn't accepted, because it could cause hierarchy inconsistencies. That's a valid point, but we need the behavior I added to make our entity updates work right.
I think what we have to do is we have to make a RollbackMapEntities trait that works essentially similar to the MapEntities trait, but with a slight behavior change, that we can implement for Parent and Children and that users can implement for their own component types that need entity mapping.
I just found that invalidating entities is still an issue,
but luckily I also discovered the fix we need in the. Just posting here for a heads-up in case anybody runs into it:bevy_hierarchy
cratehttps://github.com/bevyengine/bevy/issues/6790
For now, in my game I've just patched Bevy with the PR linked in the issue above to fix it.
_Originally posted by @zicklag in https://github.com/gschup/bevy_ggrs/issues/29#issuecomment-1329993581_
I'm re-opening this issue because the fix I opened in Bevy wasn't accepted, because it could cause hierarchy inconsistencies. That's a valid point, but we need the behavior I added to make our entity updates work right.
I think what we have to do is we have to make a
RollbackMapEntities
trait that works essentially similar to theMapEntities
trait, but with a slight behavior change, that we can implement forParent
andChildren
and that users can implement for their own component types that need entity mapping.