docs.rs failed to build chill_bevy_console-0.1.2
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
chill_bevy_console
A configurable developer console plugin for Bevy games.
Press ` (backtick) to toggle the console open and closed.
Version
chill_bevy_console |
bevy |
|---|---|
0.1 |
0.18 |
Usage
use ;
Adding commands
Commands are plain Bevy systems that receive CommandArgs (In<Args>) and return a String:
use CommandArgs;
app.add_console_command;
Args dereferences to [String] (giving you join, len, iter, …) and adds three helpers:
| Method | Returns | Description |
|---|---|---|
args.get(i) |
Option<&str> |
Argument at index i |
args.parse::<T>(i) |
Option<T> |
Argument at index i parsed as T, None if missing or invalid |
args.rest(i) |
String |
All arguments from index i joined with spaces |
Because they're normal Bevy systems, commands can take any system params:
Custom config
Every visual element is configurable via ConsoleConfig:
.add_plugins
Blocking gameplay input
Use the console_closed run condition to suppress input systems while the console is open:
app.add_systems;
Built-in commands
| Command | Description |
|---|---|
help |
List all registered commands |
clear |
Clear the console history |
License
MIT OR Apache-2.0