mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
don't panic when no RenderResourceContext can be found (#1971)
In bevy_webgl2, the `RenderResourceContext` is created after startup as it needs to first wait for an event from js side:
f31e5d49de/src/lib.rs (L117)
remove `panic` introduced in #1965 and log as a `warn` instead
This commit is contained in:
parent
80df583a21
commit
30c6ca6166
1 changed files with 3 additions and 2 deletions
|
@ -17,6 +17,7 @@ use bevy_ecs::{
|
|||
system::{IntoExclusiveSystem, IntoSystem, Res},
|
||||
};
|
||||
use bevy_transform::TransformSystem;
|
||||
use bevy_utils::tracing::warn;
|
||||
use draw::{OutsideFrustum, Visible};
|
||||
|
||||
pub use once_cell;
|
||||
|
@ -229,8 +230,8 @@ impl Plugin for RenderPlugin {
|
|||
|
||||
fn check_for_render_resource_context(context: Option<Res<Box<dyn RenderResourceContext>>>) {
|
||||
if context.is_none() {
|
||||
panic!(
|
||||
warn!(
|
||||
"bevy_render couldn't find a render backend. Perhaps try adding the bevy_wgpu feature/plugin!"
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue