bevy/examples/app/headless_defaults.rs
Hennadii Chernyshchyk 458cb7a9e9 Add headless mode (#3439)
# Objective

In this PR I added the ability to opt-out graphical backends. Closes #3155.

## Solution

I turned backends into `Option` ~~and removed panicking sub app API to force users handle the error (was suggested by `@cart`)~~.
2022-01-08 10:39:43 +00:00

11 lines
248 B
Rust

use bevy::{prelude::*, render::options::WgpuOptions};
fn main() {
App::new()
.insert_resource(WgpuOptions {
backends: None,
..Default::default()
})
.add_plugins(DefaultPlugins)
.run();
}