You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
App::new()
// Init bevy
.add_plugins(DefaultPlugins)
// Add our state type
.add_state::<AppState>()
// Add plugin for the splash screen
.add_plugins(
ProgressPlugin::new(AppState::Splash)
.continue_to(AppState::MainMenu)
.track_assets(),
)
// Add plugin for our game loading screen
.add_plugins(ProgressPlugin::new(AppState::GameLoading).continue_to(AppState::InGame))
// Load our UI assets during our splash screen
.add_systems(OnEnter(AppState::Splash), load_ui_assets)
// Our game loading screen
// systems that implement tasks to be tracked for completion:
.add_systems(
Update,
(
net_init_session.track_progress(),
world_generation.track_progress(),
internal_thing.track_progress(),
// we can also add regular untracked systems to our loading screen,
// like to draw our progress bar:
ui_progress_bar.after(TrackedProgressSet),
)
.run_if(in_state(AppState::GameLoading)),
)
.run();
So i am confused because it seems like in this example, if load_ui_assets takes a LONG time, the state would transition to AppState::MainMenu before that task is complete. If so, that is not helpful because main_main may require the ui assets. If not, how the heck is that being constrained? what part of load_ui_assets is indicating and telling the state manager to wait or go to the next state ?
The text was updated successfully, but these errors were encountered:
OH i think i see, is it the assetHandles being added to AssetsLoading?
Well what if that system doesnt get a chance to do a cycle before the progress plugin tries to go to the next state? wouldnt it just go right to the next state like a race condition?
furthermore, how could a system like that be defined such that it returns Progress instead like in an instance where i am loading something or doing some work that doesnt involve Asset Handles ?
HI, i do not fully understand this example
So i am confused because it seems like in this example, if load_ui_assets takes a LONG time, the state would transition to AppState::MainMenu before that task is complete. If so, that is not helpful because main_main may require the ui assets. If not, how the heck is that being constrained? what part of load_ui_assets is indicating and telling the state manager to wait or go to the next state ?
The text was updated successfully, but these errors were encountered: