About this project

bevy_asset_loader is a plugin for the Bevy game engine that simplifies and organizes game asset loading. It introduces a derivable `AssetCollection` trait that lets developers group related assets into structs, which are then available as Bevy ECS resources once fully loaded. The plugin's primary feature is the loading state system. Developers can configure a Bevy state dedicated to asset loading, specify which asset collections to load, and define the next state to transition to once loading completes. The loading state guarantees all asset handles are fully loaded before the next state begins. Supported asset field types include: - Single `Handle<T>` fields loaded from a file path (audio, images, etc.) - Texture atlas layouts with configurable tile size, columns, rows, and padding - Images with custom sampler configurations (filter mode, wrap mode) - Array textures with configurable layer counts - Standard materials (with the 3d feature enabled) - Folders loaded as `Vec<UntypedHandle>` or typed vectors - Lists of paths for web-compatible asset collection - Collections loaded as HashMaps using the MapKey trait Two asset configuration modes are supported: Compile-time assets use derive macro attributes directly in code. Paths and options are hardcoded, requiring recompilation for changes. Dynamic assets use the `key` attribute instead of `path`, allowing configurations to be stored in `.assets.ron` files. This separates asset data from code, reduces recompilation frequency, and makes it easier for non-programmers to manage assets. The `standard_dynamic_assets` feature enables RON file loading for dynamic assets. Additional capabilities include: - Progress tracking integration with the iyes_progress crate for loading bar support - Failure state configuration to handle missing or unloaded assets gracefully - `finally_init_resource` to initialize FromWorld resources after asset collections are loaded - Direct initialization without a loading state via `init_collection` - Asset unloading by removing AssetCollection resources when no longer needed The crate is dual-licensed under Apache-2.0 and MIT, and maintains compatibility across multiple Bevy versions, with a dedicated branch tracking Bevy's main development branch.