@@ 10,6 10,7 @@ use bevy::{
prelude::*,
tasks::{AsyncComputeTaskPool, Task},
};
+use bevy_console::PrintConsoleLine;
use futures_lite::future;
@@ 44,11 45,17 @@ fn start_connection_check(mut commands: Commands, cfg_hidden: Res<CfgHidden>) {
fn handle_connection_check(
mut commands: Commands,
mut connection_check_tasks: Query<(Entity, &mut ConnectionCheck)>,
+ mut console: EventWriter<PrintConsoleLine>,
) {
for (entity, mut task) in &mut connection_check_tasks {
if let Some(api_info) = future::block_on(future::poll_once(&mut task.0)) {
- info!("API connection check passed");
- info!("API version: {}", api_info.ver);
+ console.send(PrintConsoleLine::new(
+ "API connection check passed".to_string(),
+ ));
+ console.send(PrintConsoleLine::new(format!(
+ "API version: {}",
+ api_info.ver
+ )));
// Remove the task, since it's done now
commands.entity(entity).remove::<ConnectionCheck>();