mirror of
https://github.com/bevyengine/bevy
synced 2024-12-23 11:33:06 +00:00
fc07557913
# Objective - Make people stop believing that commands are applied immediately (hopefully). - Close #5913. - Alternative to #5930. ## Solution I added the clause “to perform impactful changes to the `World`” to the first line to subliminally help the reader accept the fact that some operations cannot be performed immediately without messing up everything. Then I explicitely said that applying a command requires exclusive `World` access, and finally I proceeded to show when these commands are automatically applied. I also added a brief paragraph about how commands can be applied manually, if they want. --- ### Further possibilities If you agree, we can also change the text of the method documentation (in a separate PR) to stress about enqueueing an action instead of just performing it. For example, in `Commands::spawn`: > Creates a new `Entity` would be changed to something like: > Issues a `Command` to spawn a new `Entity` This may even have a greater effect, since when typing in an IDE, the docs of the method pop up and the programmer can read them on the fly. |
||
---|---|---|
.. | ||
command_queue.rs | ||
mod.rs | ||
parallel_scope.rs |