NiklasEi / bevy_asset_loader

Bevy plugin helping with asset loading and organization
Apache License 2.0
452 stars 53 forks source link

API changes to simplify configuration of a loading state #167

Closed NiklasEi closed 7 months ago

NiklasEi commented 7 months ago
        .add_collection_to_loading_state::<_, ImageAssets>(MyStates::AssetLoading)
        .init_resource_after_loading_state::<_, CombinedImage>(MyStates::AssetLoading)

becomes

        .configure_loading_state(
            LoadingStateConfig::new(MyStates::AssetLoading)
                .load_collection::<ImageAssets>()
                .init_resource::<CombinedImage>(),
        )

Also resolves #164 with an improved error when configuring a loading state that is not added to the application yet.