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?
When an application exits, there is a frame after the window closed. This caused a bug in bevy_flycam which had systems that unwrapped the primary window (on that last frame, it fails to get the window and crashes). This is now fixed and it instead prints warnings when it can't find a window. However, these warnings are unnecessary when exiting the application. It would be nice if the systems didn't run when the application is exiting.
What solution would you like?
It would be nice if Bevy could provide RunCriteria for systems that run only while the application is running and also the opposite, for systems that only run when it is exiting.
They could be called run_if_running and run_if_exiting (I know RunCriteria is being reworked to use bool; I don't know if that will allow for combining/modifying them, but if so, run_if_exiting could just be !run_if_running)
I have tried to create such a system by reading AppExit events and storing the state in a resource, but to no avail.
I'm not sure how Bevy runs RunCriteria, but I imagine it could run each one once (or will with stageless ECS?), which means that upstreaming this behavior means that crates won't have duplicate systems.
What alternative(s) have you considered?
I know there is a lot of changes coming with stageless ECS so maybe there is a future solution I don't know about.
The text was updated successfully, but these errors were encountered:
What problem does this solve or what need does it fill?
When an application exits, there is a frame after the window closed. This caused a bug in
bevy_flycam
which had systems that unwrapped the primary window (on that last frame, it fails to get the window and crashes). This is now fixed and it instead prints warnings when it can't find a window. However, these warnings are unnecessary when exiting the application. It would be nice if the systems didn't run when the application is exiting.What solution would you like?
It would be nice if Bevy could provide
RunCriteria
for systems that run only while the application is running and also the opposite, for systems that only run when it is exiting.They could be called
run_if_running
andrun_if_exiting
(I knowRunCriteria
is being reworked to usebool
; I don't know if that will allow for combining/modifying them, but if so,run_if_exiting
could just be!run_if_running
)I have tried to create such a system by reading
AppExit
events and storing the state in a resource, but to no avail.I'm not sure how Bevy runs
RunCriteria
, but I imagine it could run each one once (or will with stageless ECS?), which means that upstreaming this behavior means that crates won't have duplicate systems.What alternative(s) have you considered?
I know there is a lot of changes coming with stageless ECS so maybe there is a future solution I don't know about.
The text was updated successfully, but these errors were encountered: