Closed stevenliebregt closed 2 years ago
If you're using the world inspector, you can set the enabled
boolean when a key is pressed in a system, something like
fn toggle_inspector(input: Res<Input<KeyCode>>, world_inspector_params: ResMut<WorldInspectorParams>) {
if input.just_pressed(KeyCode::Escape) {
world_inspector.params.enabled = !world_inspector_params.enabled;
}
}
Brilliant! Thanks so much, I'm quite new to Bevy so I hadn't figured out that I could use that resource.
Couldn't find any info on this, is it possible to toggle the window using a keypress?