Expand description
A configurable developer console plugin for Bevy games.
Press ` (backtick) to toggle the console open and closed. Commands are
plain Bevy systems that take CommandArgs and return a String.
§Quickstart
use bevy::prelude::*;
use chill_bevy_console::{ChillConsole, CommandArgs, ConsoleAppExt, console_closed};
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugins(ChillConsole::default())
.add_console_command("say", "say <text> — echo text", say_cmd)
.add_systems(Update, gameplay_input.run_if(console_closed))
.run();
}
fn say_cmd(In(args): CommandArgs) -> String {
args.join(" ")
}
fn gameplay_input() { /* movement, jump, etc. */ }§Cargo features
embedded-font— embedUbuntuMono-R.ttfin the binary and use it as the default font, so consumers don’t need to ship a font asset.persistent-history— load and save the console’s full display history (commands and their outputs) to a plain-text file between runs. The path is configured viaConsoleConfig::history_file.
§Customization
Every visual element is configurable via ConsoleConfig, with built-in
presets (ConsoleConfig::chillgames, ConsoleConfig::matrix,
ConsoleConfig::source) as starting points. See the
USAGE.md
guide and the examples/
directory for runnable demos.
Re-exports§
pub use config::ConsoleConfig;
Modules§
Structs§
- Args
- Parsed arguments passed to a console command system.
- Chill
Console - The main plugin.
- Console
Registry - Registry of all commands available in the console.
- Console
State
Constants§
- UBUNTU_
MONO_ FONT_ HANDLE - Stable handle for the embedded UbuntuMono font.
Only meaningful when the
embedded-fontfeature is enabled.
Traits§
Functions§
- console_
closed - Returns
truewhen the console is closed.
Type Aliases§
- Command
Args - The input type for console command systems.