diff --git a/Cargo.toml b/Cargo.toml index fd97a21..5edbf2d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_scriptum" authors = ["Jaroslaw Konik "] -version = "0.2.1" +version = "0.2.2" edition = "2021" license = "MIT OR Apache-2.0" readme = "README.md" diff --git a/src/callback.rs b/src/callback.rs index de11a8d..47b7ce8 100644 --- a/src/callback.rs +++ b/src/callback.rs @@ -85,7 +85,9 @@ macro_rules! impl_tuple { let args = ( $(args.0.get($idx).unwrap().clone_cast::<$t>(), )+ ); - Dynamic::from(inner_system.run(args, world)) + let result = inner_system.run(args, world); + inner_system.apply_deferred(world); + Dynamic::from(result) }; let system = IntoSystem::into_system(system_fn); CallbackSystem {