From 1bd936d4e79e7990a9b7bd4c04e2bc5f4a2641b5 Mon Sep 17 00:00:00 2001 From: minwook-shin Date: Mon, 1 May 2023 17:18:55 +0900 Subject: [PATCH] ADD : embed asset folder inside binary for releases --- Cargo.toml | 3 ++- src/main.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c12a5a5..abb8c7a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,6 +12,7 @@ bevy_ggrs = { version = "0.12", features = ["wasm-bindgen"] } bevy_matchbox = { version = "0.6.0", features = ["ggrs"] } bevy_asset_loader = "0.16.0" chrono = "0.4" +bevy_embedded_assets = "0.7.0" [dependencies.uuid] version = "1.3.1" @@ -19,4 +20,4 @@ features = [ "v4", # Lets you generate random UUIDs "fast-rng", # Use a faster (but still sufficiently random) RNG "macro-diagnostics", # Enable better diagnostics for compile-time UUIDs -] \ No newline at end of file +] diff --git a/src/main.rs b/src/main.rs index c7d8cb9..ac82100 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,6 +5,7 @@ use bevy_asset_loader::prelude::*; use bevy_ggrs::*; use bevy_matchbox::prelude::*; use bevy::math::Vec3Swizzles; +use bevy_embedded_assets::EmbeddedAssetPlugin; use crate::component::{GameState, GameDuration, Playerid}; use crate::system_module::network::{GgrsConfig, wait_socket}; @@ -39,7 +40,7 @@ fn main() { ..default() }), ..default() - })) + }).build().add_before::(EmbeddedAssetPlugin)) .add_plugin(GameOverPlugin) .insert_resource(ClearColor(Color::WHITE)) .insert_resource(GameDuration { game_time: Stopwatch::new() })