-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Rewrite part of Commands rustdoc #11141
Conversation
With #9822 merged the story here is a little more complex now. |
Suggestions how to rephrase it? I submit PRs to rustdoc comments, when I'm trying to understand something, and apparently I don't always understand it correctly. Also that PR says:
Doesn't it mean that bevy/examples/ecs/apply_deferred.rs Lines 22 to 29 in 8067e46
|
Yeah probably. You can still add apply_deferred manually and the algorithm will respect it, but the algo doesn't merge manually added sync points together only the auto added ones. For that reason I would not recommend not adding sync points in manually. For the example it might make sense to make a new schedule that disables auto inserted sync points. That or just delete it. That should be done in a separate PR of course. |
I think the main point of emphasis should be that it's enough to add a before/after relationship between the systems for them to see the effect of commands. |
Changed the docs — added dependencies between systems, and moved it to |
768a2d8
to
b4a9baa
Compare
# Objective Re this comment: #11141 (comment) Since #9822, Bevy automatically inserts `apply_deferred` between systems with dependencies where needed, so manually inserted `apply_deferred` doesn't to anything useful, and in current state this example does more harm than good. ## Solution The example can be modified with removal of automatic `apply_deferred` insertion, but that would immediately upgrade this example from beginner level, to upper intermediate. Most users don't need to disable automatic sync point insertion, and remaining few who do probably already know how it works. CC @hymm
- Explain it is flushed in the same schedule run (was not obvious to me) - Point to `apply_deferred` example - Remove mentions of `System::apply_deferred` and `Schedule::apply_deferred` which are probably too low level for the most users Co-authored-by: James Liu <[email protected]>
apply_deferred
exampleSystem::apply_deferred
andSchedule::apply_deferred
which are probably too low level for the most users