fn check_for_loaded(asset_server: Res<AssetServer>, handles: Res<Vec<HandleUntyped>>, mut state: ResMut<State<GameState>>) {
    let data = asset_server.get_group_load_state(handles.iter().map(|handle| handle.id));

    if data == LoadState::Loaded {
        let next_state = state.current().next_state().unwrap();
        state.push(next_state).unwrap();
    }
}
// This function exists soely because bevy's asset loading is async.
// We need to wait until all assets are loaded before we do anyhting with them.
This function exists soely because bevy's asset loading is async.
We need to wait until all assets are loaded before we do anyhting with them.
This function exists soely because bevy ' s asset loading is async . We need to wait until all assets are loaded before we do anyhting with them .
fn check_for_loaded(asset_server: Res<AssetServer>, handles: Res<Vec<HandleUntyped>>, mut state: ResMut<State<GameState>>) {
    let data = asset_server.get_group_load_state(handles.iter().map(|handle| handle.id));
    if data == LoadState::Loaded {
        let next_state = state.current().next_state().unwrap();
        state.push(next_state).unwrap();
    }
}
fn check_for_loaded ( asset_server : Res < AssetServer > , handles : Res < Vec < HandleUntyped > > , mut state : ResMut < State < GameState > > ) { let data = asset_server . get_group_load_state ( handles . iter ( ) . map ( | handle | handle . id ) ) ; if data == LoadState :: Loaded { let next_state = state . current ( ) . next_state ( ) . unwrap ( ) ; state . push ( next_state ) . unwrap ( ) ; } }
This function exists soely because bevy's asset loading is async.
This function exists soely because bevy ' s asset loading is async .
asset_server
Res<AssetServer>
handles
Res<Vec<HandleUntyped>>
state
ResMut<State<GameState>>