Crates.io | bevy_fnplugins |
lib.rs | bevy_fnplugins |
version | 0.1.1 |
source | src |
created_at | 2023-12-02 17:29:03.593024 |
updated_at | 2023-12-02 17:45:46.214434 |
description | A plugin for bevy that allows you to use functions as plugins |
homepage | |
repository | |
max_upload_size | |
id | 1056293 |
size | 111,910 |
Set rust functions as bevy plugins
bevy | bevy_fnplugins |
---|---|
0.12 | 0.1 |
use bevy::prelude::*;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.fn_plugins(example_plugin)
.run();
}
fn example_plugin(app: &mut App) {
app.add_system(Startup, hello_system);
}
fn hello_system() {
println!("It works!");
}
For more examples, see the examples directory.