# 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 |
||
|---|---|---|
| .. | ||
| commands | ||
| exclusive_function_system.rs | ||
| exclusive_system_param.rs | ||
| function_system.rs | ||
| mod.rs | ||
| query.rs | ||
| system_chaining.rs | ||
| system_param.rs | ||
| system.rs | ||