add bevy_embed_assets plugin for compact releases

This commit is contained in:
yuni 2024-03-22 11:49:34 +01:00
parent 64757d1fcb
commit a0031603e5
3 changed files with 26 additions and 2 deletions

21
Cargo.lock generated
View file

@ -512,6 +512,18 @@ dependencies = [
"syn 2.0.52",
]
[[package]]
name = "bevy_embedded_assets"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a4b0bfcdcbd0c59829415ae0756757d50dfdb0c8f324087b4a2daabb3971fbd"
dependencies = [
"bevy",
"cargo-emit",
"futures-io",
"futures-lite",
]
[[package]]
name = "bevy_encase_derive"
version = "0.13.0"
@ -1222,6 +1234,12 @@ dependencies = [
"thiserror",
]
[[package]]
name = "cargo-emit"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1582e1c9e755dd6ad6b224dcffb135d199399a4568d454bd89fe515ca8425695"
[[package]]
name = "cc"
version = "1.0.90"
@ -2658,9 +2676,10 @@ dependencies = [
[[package]]
name = "outfly"
version = "0.1.3"
version = "0.2.0"
dependencies = [
"bevy",
"bevy_embedded_assets",
"regex",
]

View file

@ -9,6 +9,7 @@ edition = "2021"
regex = "1"
bevy = { version = "0.13.0", features = ["jpeg", "minimp3", "dynamic_linking"] }
#bevy = { version = "0.13.0", features = ["jpeg", "minimp3"] }
bevy_embedded_assets = "0.10.2"
# Enable a small amount of optimization in debug mode
[profile.dev]

View file

@ -11,9 +11,13 @@ mod nature;
use bevy::window::{Window, WindowMode, PrimaryWindow, CursorGrabMode};
use bevy::diagnostic::FrameTimeDiagnosticsPlugin;
use bevy::prelude::*;
use bevy_embedded_assets::{EmbeddedAssetPlugin, PluginMode};
fn main() {
App::new().add_plugins(OutFlyPlugin).run();
App::new().add_plugins((
EmbeddedAssetPlugin { mode: PluginMode::ReplaceDefault },
OutFlyPlugin,
)).run();
}
pub struct OutFlyPlugin;