bevy/crates/bevy_render/src/render_phase
dataphract 5bb4201f2e add informative panic message when adding render commands to a DrawFunctions that does not exist (#3924)
# Objective

If a user attempts to `.add_render_command::<P, C>()` on a world that does not contain `DrawFunctions<P>`, the engine panics with a generic `Option::unwrap` message:

```
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /[redacted]/bevy/crates/bevy_render/src/render_phase/draw.rs:318:76
```

## Solution

This PR adds a panic message describing the problem:

```
thread 'main' panicked at 'DrawFunctions<outline::MeshStencil> must be added to the world as a resource before adding render commands to it', /[redacted]/bevy/crates/bevy_render/src/render_phase/draw.rs:322:17
```
2022-02-13 00:14:37 +00:00
..
draw.rs add informative panic message when adding render commands to a DrawFunctions that does not exist (#3924) 2022-02-13 00:14:37 +00:00
draw_state.rs Fix doc_markdown lints in bevy_render (#3479) 2022-01-09 11:09:46 +00:00
mod.rs Add 2d meshes and materials (#3460) 2022-01-08 01:29:08 +00:00