Expand description
§Bevy Embedded Assets
Embed your asset folder inside your binary for easier releases.
use bevy::prelude::*;
use bevy_embedded_assets::EmbeddedAssetPlugin;
fn main() {
App::new().add_plugins((EmbeddedAssetPlugin::default(), DefaultPlugins));
}
EmbeddedAssetPlugin
has three modes:
PluginMode::AutoLoad
will embed the asset folder and make it available through theembedded://
sourcePluginMode::ReplaceDefault
will embed the asset folder and make it available through the default sourcePluginMode::ReplaceAndFallback
will embed the asset folder and make it available through the default source. If a fail is not found at runtime, it fallback to the default source for the current platform
§Bevy Compatibility
Bevy | bevy_embedded_assets |
---|---|
main | main |
0.15 | 0.12 |
0.14 | 0.11 |
0.13 | 0.10 |
0.12 | 0.9 |
0.11 | 0.8 |
0.10 | 0.7 |
0.9 | 0.6 |
0.8 | 0.4 |
0.7 | 0.3 |
0.6 | 0.2 |
0.5 | 0.1 |
Structs§
- Data
Reader - A wrapper around the raw bytes of an asset.
This is returned by
EmbeddedAssetReader::load_path_sync()
. - Embedded
Asset Plugin - Bevy plugin to embed all your asset folder.
- Embedded
Asset Reader - Struct which can be used to retrieve embedded assets directly
without the normal Bevy
Handle<T>
approach. This is useful for cases where you need an asset outside the Bevy ECS environment.
Enums§
- Plugin
Mode - How
EmbeddedAssetPlugin
should behave.