Crates.io | bevy_asset_packer |
lib.rs | bevy_asset_packer |
version | 0.4.0 |
source | src |
created_at | 2023-08-10 14:12:32.964164 |
updated_at | 2023-08-19 11:54:01.484862 |
description | Easy to use bevy plugin for packing resources in single file and protect him. |
homepage | https://github.com/DublikuntMux/bevy_asset_packer |
repository | https://github.com/DublikuntMux/bevy_asset_packer |
max_upload_size | |
id | 941023 |
size | 23,925 |
Easy to use bevy plugin for packing resources in single file and protect him.
Add to Cargo.toml
:
[build-dependencies]
bevy_asset_packer = "0.4.0"
[dependencies]
bevy_asset_packer = "0.4.0"
In src/main.rs
fn main() {
let mut options = AssetBundlingOptions::default();
options.encode_file_names = true;
options.compress_on = true;
options.set_encryption_key([57, 206, 200, 7, 215, 17, 45, 219, 131, 171, 8, 214, 85, 12, 129, 176]);
App::new()
.add_plugins(
DefaultPlugins
.build()
.add_before::<bevy::asset::AssetPlugin, _>(BundledAssetIoPlugin::from(options)),
)
.run();
}
In build.rs
fn main() {
let mut options = AssetBundlingOptions::default();
options.encode_file_names = true;
options.compress_on = true;
options.set_encryption_key([57, 206, 200, 7, 215, 17, 45, 219, 131, 171, 8, 214, 85, 12, 129, 176]);
AssetBundler::from(options).build().unwrap();
}
You can see examle in example folder.
And its all!!!