Skip to content
Discussion options

You must be logged in to vote

I was able to fix this by making the spawning and despawning systems exclusive:

impl Plugin for LoadingPlugin {
    fn build(&self, app: &mut App) {
        let spawn = SystemSet::on_enter(AppState::Loading)
            .with_system(spawn_loading.exclusive_system());

        let update = SystemSet::on_update(AppState::Loading)
            .with_system(update_loading_progress)
            .with_system(check_loading_done);

        let unload = SystemSet::on_exit(AppState::Loading)
            .with_system(unload_loading.exclusive_system());

        app.add_system_set(spawn)
            .add_system_set(update)
            .add_system_set(unload);
    }
}

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@sephelps
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by sephelps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants