bevy/crates/bevy_ecs/src/system/commands
Federico Rinaldi aa32a77fdd Update API docs for Commands::get_or_spawn to inform the user about invalid returned values (#6117)
# 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
2022-09-28 14:09:39 +00:00
..
command_queue.rs Spawn now takes a Bundle (#6054) 2022-09-23 19:55:54 +00:00
mod.rs Update API docs for Commands::get_or_spawn to inform the user about invalid returned values (#6117) 2022-09-28 14:09:39 +00:00
parallel_scope.rs Update codebase to use IntoIterator where possible. (#5269) 2022-07-11 15:28:50 +00:00