-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove the UpdateAssets and AssetEvents schedules #11986
Remove the UpdateAssets and AssetEvents schedules #11986
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good: I really like this as an incremental improvement.
crates/bevy_asset/src/lib.rs
Outdated
/// Schedule where [`Assets`] resources are updated. | ||
#[derive(Debug, Hash, PartialEq, Eq, Clone, ScheduleLabel)] | ||
#[derive(Debug, Hash, PartialEq, Eq, Clone, SystemSet)] | ||
pub struct UpdateAssets; | ||
|
||
/// Schedule where events accumulated in [`Assets`] are applied to the [`AssetEvent`] [`Events`] resource. | ||
/// | ||
/// [`Events`]: bevy_ecs::event::Events | ||
#[derive(Debug, Hash, PartialEq, Eq, Clone, ScheduleLabel)] | ||
#[derive(Debug, Hash, PartialEq, Eq, Clone, SystemSet)] | ||
pub struct AssetEvents; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently unused, could be used to maybe keep backwards compatibility, but the migration should be very simple
That would mean this has to wait until 0.14 though
# Objective Fix bevyengine#11845. ## Solution Remove the `UpdateAssets` and `AssetEvents` schedules. Moved the `UpdateAssets` systems to `PreUpdate`, and `AssetEvents` systems into `First`. The former is meant to run before any of the event flushes. ## Future Work It'd be ideal if we could manually flush the events for assets to avoid needing two, sort of redundant, systems. This should at least let them potentially run in parallel with all of the systems in the schedules they were moved to. --- ## Changelog Removed: `UpdateAssets` schedule from the main schedule. All systems have been moved to `PreUpdate`. Removed: `AssetEvents` schedule from the main schedule. All systems have been move to `First` with the same system sets. ## Migration Guide TODO
# Objective Fix bevyengine#11845. ## Solution Remove the `UpdateAssets` and `AssetEvents` schedules. Moved the `UpdateAssets` systems to `PreUpdate`, and `AssetEvents` systems into `First`. The former is meant to run before any of the event flushes. ## Future Work It'd be ideal if we could manually flush the events for assets to avoid needing two, sort of redundant, systems. This should at least let them potentially run in parallel with all of the systems in the schedules they were moved to. --- ## Changelog Removed: `UpdateAssets` schedule from the main schedule. All systems have been moved to `PreUpdate`. Removed: `AssetEvents` schedule from the main schedule. All systems have been move to `First` with the same system sets. ## Migration Guide TODO
Objective
Fix #11845.
Solution
Remove the
UpdateAssets
andAssetEvents
schedules. Moved theUpdateAssets
systems toPreUpdate
, andAssetEvents
systems intoFirst
. The former is meant to run before any of the event flushes.Future Work
It'd be ideal if we could manually flush the events for assets to avoid needing two, sort of redundant, systems. This should at least let them potentially run in parallel with all of the systems in the schedules they were moved to.
Changelog
Removed:
UpdateAssets
schedule from the main schedule. All systems have been moved toPreUpdate
.Removed:
AssetEvents
schedule from the main schedule. All systems have been move toFirst
with the same system sets.Migration Guide
TODO