You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What problem does this solve or what need does it fill?
Sometimes you need to do work based on calculated components before they would normally be calculated.
You could move the corresponding systems before your system but systems after that system might update these components again.
You could run the corresponding systems before your system by adding them again right before your own but this will cause them to be calculated twice.
What solution would you like?
It would be nice to have some way to configure a system to have an internally change detection that is synced across multiple instances of itself. Basically resetting each time it runs even if it appears multiple times in a schedule.
I don't think this should be the default behavior for systems because it is just an optimization for some use cases.
Basically having a method on system that could recreate a new system that has this behavior.
Something like update_system.internal_change_detection() which returns a system that can be used multiple times.
Could also be a different query filter like InternalChanged or InternalAdded.
I don't think "internal" is the best word for this but it is the only thing I can think of right now.
What alternative(s) have you considered?
living with repeated work
living with one frame delays
implementing an external library
Additional context
My use cases in the past have been with GlobalTransform so an external library would not be an optimal solution.
I just lived with a one frame delay because I didn't think of finding the systems responsible for updating GlobalTransform in Bevy and reading them before my system. This would cause them to be calculated twice even if they weren't changed between the two duplicate instances of the systems.
The text was updated successfully, but these errors were encountered:
It seems like this could be used to implement a solution to this. I could play around with this a bit and see if I can make a prototype.
I still think that an implementation should be in Bevy and used my some systems like transform propagation so that people can easily add these systems multiple times without causing performance issues.
What problem does this solve or what need does it fill?
Sometimes you need to do work based on calculated components before they would normally be calculated.
You could move the corresponding systems before your system but systems after that system might update these components again.
You could run the corresponding systems before your system by adding them again right before your own but this will cause them to be calculated twice.
What solution would you like?
It would be nice to have some way to configure a system to have an internally change detection that is synced across multiple instances of itself. Basically resetting each time it runs even if it appears multiple times in a schedule.
I don't think this should be the default behavior for systems because it is just an optimization for some use cases.
Basically having a method on system that could recreate a new system that has this behavior.
Something like
update_system.internal_change_detection()
which returns a system that can be used multiple times.Could also be a different query filter like
InternalChanged
orInternalAdded
.I don't think "internal" is the best word for this but it is the only thing I can think of right now.
What alternative(s) have you considered?
Additional context
My use cases in the past have been with
GlobalTransform
so an external library would not be an optimal solution.I just lived with a one frame delay because I didn't think of finding the systems responsible for updating
GlobalTransform
in Bevy and reading them before my system. This would cause them to be calculated twice even if they weren't changed between the two duplicate instances of the systems.The text was updated successfully, but these errors were encountered: