pub trait AddConsoleCommand {
    // Required method
    fn add_console_command<T: Command, Params>(
        &mut self,
        system: impl IntoSystemConfigs<Params>
    ) -> &mut Self;
}
Expand description

Add a console commands to Bevy app.

Required Methods§

source

fn add_console_command<T: Command, Params>( &mut self, system: impl IntoSystemConfigs<Params> ) -> &mut Self

Add a console command with a given system.

This registers the console command so it will print with the built-in help console command.

§Example
App::new()
    .add_console_command::<LogCommand, _>(log_command);

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl AddConsoleCommand for App

source§

fn add_console_command<T: Command, Params>( &mut self, system: impl IntoSystemConfigs<Params> ) -> &mut Self

Implementors§