1 unstable release
| 0.1.0 | Aug 16, 2024 |
|---|
#1130 in #game
31KB
127 lines
bevy-kenney-assets
Load kenney assets as texture atlases
-
Acquire kenney assets
- make sure the spritesheet .xml and associated .png have the same name
- place assets in
assets/directory
-
Add
bevy-kenney-assetscargo add bevy-kenney-assets -
Add Plugin
app.add_plugins(KenneyAssetPlugin); -
Load spritesheets
a. with
AssetServer```rust let handle: Handle<KenneySpriteSheetAsset> = asset_server.load("spaceShooter2_spritesheet_2X.xml"); ```b. with
bevy_asset_loader```rust #[derive(AssetCollection, Resource)] pub struct ImageAssets { #[asset(path = "space-shooter-redux/sheet.xml")] pub space_sheet: Handle<KenneySpriteSheetAsset>, } ```
Dependencies
~44–83MB
~1.5M SLoC