Basically I start my game in a GameState::Loading and after everything is loaded I change to GameState::Login, but I want to render some UI components here in a startup system (I'm not sure if this is the right way to do it), but when I change my state to GameState::Login I receive a warning and nothing renders
App::new()
.add_plugins(DefaultPlugins.set(WindowPlugin {
window: WindowDescriptor {
title: String::from("Game"),
mode: WindowMode::BorderlessFullscreen,
..Default::default()
},
..Default::default()
}))
.add_plugin(WorldInspectorPlugin::default())
.add_state(GameState::Loading)
.add_startup_system(load_assets)
.add_startup_system(loading_ui)
.add_startup_system(connect_to_server)
.add_system_set(SystemSet::on_enter(GameState::Loading).with_system(check_assets_loaded))
.add_startup_system_set(SystemSet::on_enter(GameState::Login).with_system(login_ui))
.run();
And the warning that I get:
WARN bevy_ecs::schedule::graph_utils: Pipe(bevy_ecs::schedule::state::State<client::state::GameState>::on_enter::{{closure}}, bevy_ecs::schedule::state::should_run_adapter<client::state::GameState>) wants to be after unknown label: client::state::GameState