add debug log
This commit is contained in:
12
src/debug.rs
Normal file
12
src/debug.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
use bevy::prelude::*;
|
||||
use bevy_debug_log::LogViewerVisibility;
|
||||
|
||||
pub fn plugin(app: &mut App) {
|
||||
app.add_systems(Update, update);
|
||||
}
|
||||
|
||||
fn update(mut commands: Commands, keyboard: Res<ButtonInput<KeyCode>>) {
|
||||
if keyboard.just_pressed(KeyCode::Backquote) {
|
||||
commands.trigger(LogViewerVisibility::Toggle);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user