NiklasEi / bevy_asset_loader

Bevy plugin helping with asset loading and organization
Apache License 2.0
506 stars 56 forks source link

API changes to simplify configuration of a loading state #167

Closed NiklasEi closed 11 months ago

NiklasEi commented 1 year 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.