use bevy::prelude::*; use bevy_scriptum::prelude::*; use bevy_scriptum::runtimes::lua::prelude::*; fn main() { App::new() .add_plugins(DefaultPlugins) .add_scripting::(|runtime| { runtime.add_function(String::from("hello_bevy"), hello_bevy_callback_system); }) .add_systems(Startup, startup) .run(); } fn startup(mut commands: Commands, assets_server: Res) { commands.spawn(Script::::new( assets_server.load("examples/lua/hello_world.lua"), )); } fn hello_bevy_callback_system() { println!("hello bevy, called from script"); }