do not call `on_os_event` if scene is disabled
@@ -663,8 +663,10 @@ impl Engine {
scene: Handle<Scene>,
dt: f32,
) {
+ let scene = &mut self.scenes[scene];
+ if scene.enabled {
process_scripts(
- &mut self.scenes[scene],
+ scene,
&mut self.plugins,
&self.resource_manager,
dt,
@@ -675,6 +677,7 @@ impl Engine {
},
)
}
+ }
/// Initializes every script in the scene.
///
