mirror of
https://github.com/bevyengine/bevy
synced 2024-12-23 11:33:06 +00:00
aa32a77fdd
# Objective As explained by #5960, `Commands::get_or_spawn` may return a dangling `EntityCommands` that references a non-existing entities. As explained in [this comment], it may be undesirable to make the method return an `Option`. - Addresses #5960 - Alternative to #5961 ## Solution This PR adds a doc comment to the method to inform the user that the returned `EntityCommands` is not guaranteed to be valid. It also adds panic doc comments on appropriate `EntityCommands` methods. [this comment]: https://github.com/bevyengine/bevy/pull/5961#issuecomment-1259870849 |
||
---|---|---|
.. | ||
command_queue.rs | ||
mod.rs | ||
parallel_scope.rs |