bevy/crates/bevy_render/src
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
..
camera Add headless mode (#3439) 2022-01-08 10:39:43 +00:00
color Fix doc_markdown lints in bevy_render (#3479) 2022-01-09 11:09:46 +00:00
mesh bevy_render: Fix Quad flip (#3741) 2022-02-12 00:46:04 +00:00
primitives bevy_gltf: Add support for loading lights (#3506) 2022-01-03 07:59:25 +00:00
render_graph Fixed doc comment with render Node input/output methods (#3642) 2022-01-17 20:44:22 +00:00
render_phase add informative panic message when adding render commands to a DrawFunctions that does not exist (#3924) 2022-02-13 00:14:37 +00:00
render_resource doc: remove mention of void return type in entry_point docs (#3881) 2022-02-07 22:07:43 +00:00
renderer bevy_render: Only auto-disable mappable primary buffers for discrete GPUs (#3803) 2022-01-31 01:22:17 +00:00
texture Fix HDR asset support (#3795) 2022-02-04 21:22:12 +00:00
view Add view transform to view uniform (#3885) 2022-02-08 04:14:34 +00:00
lib.rs Add headless mode (#3439) 2022-01-08 10:39:43 +00:00
options.rs Enable the doc_markdown clippy lint (#3457) 2022-01-09 23:20:13 +00:00
render_asset.rs Fix doc_markdown lints in bevy_render (#3479) 2022-01-09 11:09:46 +00:00
render_component.rs Deprecate .system (#3302) 2022-02-08 04:00:58 +00:00