macro_rules! on_load {
($function:path) => { ... };
}Expand description
Run a function every time the library loads, hot reloads included, once its classes are registered: the place to register console commands and variables, which an unload removes.
ⓘ
fn startup() {
let _ = rusteal_runtime::runtime::console::register_command("my.hello", "Say hello", |_, _| {});
}
rusteal_runtime::on_load!(startup);