Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unique name for each plugin instance #19

Merged
merged 1 commit into from Nov 22, 2022

Conversation

mockersf
Copy link
Contributor

Instead of marking the plugin as not unique, give it a unique name depending on the state it's loading in.

This means that

        // Add plugin for the splash screen
        .add_plugin(
            ProgressPlugin::new(AppState::Splash)
                .continue_to(AppState::MainMenu)
                .track_assets(),
        )
        // Add plugin for our game loading screen
        .add_plugin(ProgressPlugin::new(AppState::GameLoading).continue_to(AppState::InGame))

will work, but

        // Add plugin for the splash screen
        .add_plugin(
            ProgressPlugin::new(AppState::Splash)
                .continue_to(AppState::MainMenu)
                .track_assets(),
        )
        // Add plugin for our game loading screen
        .add_plugin(ProgressPlugin::new(AppState::Splash).continue_to(AppState::InGame))

won't, blocking adding by mistake the plugin twice with the same state

@inodentry
Copy link
Collaborator

Interesting. OK, i like this, helps improve correctness. Merging the PR, but im not sure this is worth making another release for... 🤔

@inodentry inodentry merged commit ef54a86 into IyesGames:main Nov 22, 2022
inodentry added a commit that referenced this pull request May 6, 2023
* fix assets tracking logic

* depend on bevy main

* Udate to latest Bevy main; prep for 0.8 (#16)

* Update to latest Bevy commit

* Manually derive StageLabel

* Do not pin the Bevy commit

* Cargo.toml: point back at non-forked iyes_loopless

Co-authored-by: Ida Iyes <40234599+inodentry@users.noreply.github.com>

* loopless moved some things around

* v0.4: Bevy 0.8

* refactor things conditional on loopless into separate files

* implement "hidden progress"

* abstract progress return types with a trait

* add hidden progress to example

* add dummy systems, they might be useful to someone

* version bump to 0.5.0

* update to iyes_loopless 0.8

* version bump to 0.6.0

* bevy 0.9 compat

* Mark progress plugin as not unique (#18)

* Version bump to 0.7.1

* unique name for each plugin instance (#19)

* add note about issue #20

* Bump Bevy to main 0.11-dev

---------

Co-authored-by: Ida Iyes <identry@protonmail.com>
Co-authored-by: Niklas Eicker <git@nikl.me>
Co-authored-by: Ida Iyes <40234599+inodentry@users.noreply.github.com>
Co-authored-by: François <mockersf@gmail.com>
NiklasEi added a commit to NiklasEi/iyes_progress that referenced this pull request Oct 21, 2023
* fix assets tracking logic

* depend on bevy main

* Udate to latest Bevy main; prep for 0.8 (IyesGames#16)

* Update to latest Bevy commit

* Manually derive StageLabel

* Do not pin the Bevy commit

* Cargo.toml: point back at non-forked iyes_loopless

Co-authored-by: Ida Iyes <40234599+inodentry@users.noreply.github.com>

* loopless moved some things around

* v0.4: Bevy 0.8

* refactor things conditional on loopless into separate files

* implement "hidden progress"

* abstract progress return types with a trait

* add hidden progress to example

* add dummy systems, they might be useful to someone

* version bump to 0.5.0

* update to iyes_loopless 0.8

* version bump to 0.6.0

* bevy 0.9 compat

* Mark progress plugin as not unique (IyesGames#18)

* Version bump to 0.7.1

* unique name for each plugin instance (IyesGames#19)

* add note about issue IyesGames#20

* Bump Bevy to main 0.11-dev

---------

Co-authored-by: Ida Iyes <identry@protonmail.com>
Co-authored-by: Niklas Eicker <git@nikl.me>
Co-authored-by: Ida Iyes <40234599+inodentry@users.noreply.github.com>
Co-authored-by: François <mockersf@gmail.com>
inodentry added a commit that referenced this pull request Feb 18, 2024
* Update to latest Bevy main 0.11 (#23)

* fix assets tracking logic

* depend on bevy main

* Udate to latest Bevy main; prep for 0.8 (#16)

* Update to latest Bevy commit

* Manually derive StageLabel

* Do not pin the Bevy commit

* Cargo.toml: point back at non-forked iyes_loopless

Co-authored-by: Ida Iyes <40234599+inodentry@users.noreply.github.com>

* loopless moved some things around

* v0.4: Bevy 0.8

* refactor things conditional on loopless into separate files

* implement "hidden progress"

* abstract progress return types with a trait

* add hidden progress to example

* add dummy systems, they might be useful to someone

* version bump to 0.5.0

* update to iyes_loopless 0.8

* version bump to 0.6.0

* bevy 0.9 compat

* Mark progress plugin as not unique (#18)

* Version bump to 0.7.1

* unique name for each plugin instance (#19)

* add note about issue #20

* Bump Bevy to main 0.11-dev

---------

Co-authored-by: Ida Iyes <identry@protonmail.com>
Co-authored-by: Niklas Eicker <git@nikl.me>
Co-authored-by: Ida Iyes <40234599+inodentry@users.noreply.github.com>
Co-authored-by: François <mockersf@gmail.com>

* Update to Bevy main 0.13

* Bump version for Bevy 0.13

* Bump Bevy dependency to 0.13

---------

Co-authored-by: José Pazos Pérez <jose.pazos.perez@rai.usc.es>
Co-authored-by: Ida Iyes <identry@protonmail.com>
Co-authored-by: Ida Iyes <40234599+inodentry@users.noreply.github.com>
Co-authored-by: François <mockersf@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants