forked from bevyengine/bevy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug where events are not being dropped (bevyengine#11528)
# Objective Fix an issue where events are not being dropped after being read. I believe bevyengine#10077 introduced this issue. The code currently works as follows: 1. `EventUpdateSignal` is **shared for all event types** 2. During the fixed update phase, `EventUpdateSignal` is set to true 3. `event_update_system`, **unique per event type**, runs to update Events<T> 4. `event_update_system` reads value of `EventUpdateSignal` to check if it should update, and then **resets** the value to false If there are multiple event types, the first `event_update_system` run will reset the shared `EventUpdateSignal` signal, preventing other events from being cleared. ## Solution I've updated the code to have separate signals per event type and added a shared signal to notify all systems that the time plugin is installed. ## Changelog - Fixed bug where events were not being dropped
- Loading branch information
Showing
3 changed files
with
89 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters