embed assets into binary only in release builds
This commit is contained in:
parent
a0031603e5
commit
d2bb8d447c
14
src/main.rs
14
src/main.rs
|
@ -14,10 +14,16 @@ use bevy::prelude::*;
|
|||
use bevy_embedded_assets::{EmbeddedAssetPlugin, PluginMode};
|
||||
|
||||
fn main() {
|
||||
App::new().add_plugins((
|
||||
EmbeddedAssetPlugin { mode: PluginMode::ReplaceDefault },
|
||||
OutFlyPlugin,
|
||||
)).run();
|
||||
if cfg!(debug_assertions) {
|
||||
App::new().add_plugins((
|
||||
OutFlyPlugin,
|
||||
)).run();
|
||||
} else {
|
||||
App::new().add_plugins((
|
||||
EmbeddedAssetPlugin { mode: PluginMode::ReplaceDefault },
|
||||
OutFlyPlugin,
|
||||
)).run();
|
||||
}
|
||||
}
|
||||
|
||||
pub struct OutFlyPlugin;
|
||||
|
|
Loading…
Reference in a new issue